I'm using DM on a legacy sqlite3 database where the primary keys are defined as: "id INTEGER PRIMARY KEY"
I'm trying to match this in the property definition for id, but I can't get it quite right. Below are the property definitions I've tried, the generated SQL, and why they don't work the way I need. 1) property :id, Serial # id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT 2) property :id, Integer, :key => true # id INTEGER NOT NULL, PRIMARY KEY(id) Method 1 would be great if there was a way to turn off AUTOINCREMENT. That keyword causes a slightly different and less efficient to be used than the default key selection algorithm. Method 2 causes :id to be nil unless I specify it, which is not acceptable for a number of reasons. Is there a way (apart from hacking DM) to generate either of the following SQL with a property definition? id INTEGER PRIMARY KEY - or - id INTEGER NOT NULL PRIMARY KEY --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to datamapper@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/datamapper?hl=en -~----------~----~----~----~------~----~------~--~---