I'm working with the active record style ORM ACTIVE ANDROID and I want to know how can I set the "autoincrement" propety to a column. Thank you.
Asked
Active
Viewed 571 times
0
-
https://www.sqlite.org/autoinc.html – Kristy Welsh Jan 23 '15 at 14:34
1 Answers
0
Are you looking to create an autoincrement column in addition to the ID column? Based on a quick review of the code, it doesn't look to be possible unless you create the column using a raw SQL statement. The Column object has various things that can be set such as name, length, notNull, unique, etc., but nothing for creating an Autoincrement column other than the ID column that is created automatically. Here's the relevant code for defining the Column object:
https://github.com/pardom/ActiveAndroid/blob/master/src/com/activeandroid/annotation/Column.java

irotsoma
- 705
- 2
- 8
- 15