[Modeling-users] _sqlite.IntegrityError:PRIMARY KEY must be unique
Status: Abandoned
Brought to you by:
sbigaret
From: Mario R. <ma...@ru...> - 2003-08-10 12:26:52
|
Hi, I am getting this error (subject line) when I try to insert a new object into a table. The PK in question is not a class property, and I do not mess with it in any way. The situation is that I had a bunch of rows already in this table, and dumped the sql for them to be able to recreate them. I then recreated the sqlite db to reflect changes to the model, and i re-inserted the previously existing rows for the one table (which is completely untouched by the model changes). Doing a "select * from table" gives the rows correctly. However, since then, the primary key count for newly created objects has restarted at 1, and each time i attempt to insert a new object, he (the EC) increments this, but since there are already so many in the db, the insertion fails with the above error. What's going on? mario |