Reputation: 8166
I'm using Subsonic (simplerepository) and SQLite, and I have a class with an Int64 property marked as [SubSonicPrimaryKey]:
[SubSonicPrimaryKey]
public Int64 MyID;
which is transformed into:
[MyID] integer NOT NULL PRIMARY KEY AUTOINCREMENT
Is it possible to disable the AUTOINCREMENT feature?
Upvotes: 1
Views: 519
Reputation: 8166
Well, I found it by myself. Autoincrement feature is automatic and cannot be switched off. Here's what the code does:
if(column.IsPrimaryKey)
{
sb.Append(" NOT NULL PRIMARY KEY");
if(column.IsNumeric)
sb.Append(" AUTOINCREMENT ");
}
Upvotes: 2