turbomanage / storm-gen

Simple ORM for Android SQLite
Apache License 2.0
83 stars 15 forks source link

Application provided Object ID for save (insert) operation #7

Open turbomanage opened 10 years ago

turbomanage commented 10 years ago

From https://code.google.com/p/storm-gen/issues/detail?id=23

What steps will reproduce the problem?

  1. Set id of object to be persisted
  2. Save (insert) object into table
  3. Auto-increment ID used not the one provided in object

What is the expected output? What do you see instead?

When inserting objects into table there is a need sometimes to use the id provided by the app. For example the application synch data via cloud between phone and tablet versions of the app, object created on the tablet need to make its way to the phone, object does not exist in phone db, but we have an id for it allready.