Autoincrement Field is Ignored for Inserts
DBFlow Version: 4.0.5
Issue Kind (Bug, Question, Feature): bug
Not using instant run.
Description:
For an empty table mytable with an auto increment field id and a text field v1:
Expected:
sql: insert into `mytable` (id,v1) values(50,"foo")
result: 50 | foo
sql: insert into table (v1) values("bar")
result: 51 | bar
Starting with an empty table, in code:
MyTable myTable = new MyTable();
myTable.setId(50);
myTable.setV1("foo");
myTable.save();
result: myTable.id == 1 (valid id was stomped on)
it was intended. But what I can do for 4.1.0, is provide an AutoIncrementModelSaver which will do what you want. It will apply automatically for any autoincrementing table.
That could work. Thanks!
in develop. if you get time to try it out, I recommend it.
replace dbflow version with a3f1f776f3, and try it out.
Where do I insert this? My tables extend BaseProviderModel.