Page 1 of 1
sqlite - intiger filed is always auto generated
Posted: Thu 06 Oct 2011 13:13
by dilbert
For Sqlite database a primary key field with type 'integer' is generated as 'Auto Generated Value' even if it hasn't 'autoincrement' attribute.
Posted: Fri 07 Oct 2011 12:13
by StanislavK
The point is that integer primary key
is auto-generated in SQLite, regardless of whether the 'autoincrement' keyword is used or not:
http://www.sqlite.org/faq.html#q1
However, we plan to implement an option controlling this behaviour: if this option is enabled, the integer primary key will not be marked as auto-generated by default in the model. We will post here when the corresponding build is available. At the moment, you can clear the 'Auto Generated Value' check box manually to be able to insert custom values into integer primary key columns.
Posted: Fri 07 Oct 2011 13:04
by dilbert
I experienced this issue with child table when its (integer) primary key was also a foreign key. In that case it couldn't be 'auto generated'.
However, I understand why it is generated that way.
Thanks for your clarification.
Posted: Mon 10 Oct 2011 13:22
by StanislavK
Thank you for the clarification. We will change the behaviour for 'child' sides of one-to-one associations (so that they are no more marked as auto-generated).
Posted: Thu 27 Oct 2011 16:47
by Shalex
The option to set Store Generated Pattern to None for int primary keys will be added starting from the next version (not build) of Entity Developer. We will post here when it is released.
Posted: Fri 09 Dec 2011 16:51
by Shalex
New version of Entity Developer 4.2 is released!
It can be downloaded from
http://www.devart.com/entitydeveloper/download.html (trial version) or from Registered Users' Area (for users with valid subscription only).
For more information, please refer to
http://www.devart.com/forums/viewtopic.php?t=22845 .