﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
757	Cannot set primary key value manually for new objects.	cygnus@…	Adrian Holovaty	"When calling '''object.save()''' for objects whose primary key values *do not* exist in the model table, an auto-assigned primary key value is used instead of the one that I assign in my program.  For example, this code will result in a primary key based on a '''db.get_last_insert_id''' call rather than the value I assign (assuming no record with id = 15 exists in the model table):
{{{
obj = SomeModel()
obj.id = 15
obj.save()
}}}
The object.save() code in meta/!__init!__.py assumes that if the ID does not already exist, an INSERT must take place and any auto-assign fields must get their values accordingly."	defect	closed	Core (Other)		major	fixed			Unreviewed	0	0	0	0	0	0
