You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the first case (extending) the second save() will replace the value of the row saved in the first save(), while in the annotated case it will save 2 different objects in the DB.
I understand why this is the case. When extending SugarRecord has an id field where it saves a reference of the row ID so in the second save it can tell that it's the same object. This is not true when using annotations.
This is a problem when trying to update an entity that's annotated. See #185
The text was updated successfully, but these errors were encountered:
I've noticed that the following code will behave differently depending if the entity extends
SugarRecord
or if it's annotated with@Table
In the first case (extending) the second save() will replace the value of the row saved in the first save(), while in the annotated case it will save 2 different objects in the DB.
I understand why this is the case. When extending SugarRecord has an
id
field where it saves a reference of the row ID so in the second save it can tell that it's the same object. This is not true when using annotations.This is a problem when trying to update an entity that's annotated. See #185
The text was updated successfully, but these errors were encountered: