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 InMemoryEngine the Save will return the number of entities that already exist and updates them where necessary. In SQLEngine the Save will return the number of entities to be updated. In the case where the item exists but doesn't need to be updated InMemoryEngine returns 1 and SQLEngine returns 0. The 0 returned from SQLEngine then prompts the Insert.
Save() return values:
| Exists no change | Exists change needed | Does not exist
InMemoryEngine | 1 | 1 | 0
SQLEngine | 0 | 1 | 0
Save() != Exists() in SQLEngine is there a better method to check whether something already exists in InsertOrUpdate() or should Save() change so that is is synonymous with exists.
Either way InMemoryEngine and SQLEngine should give the same results.
The text was updated successfully, but these errors were encountered:
In
InMemoryEngine
the Save will return the number of entities that already exist and updates them where necessary. InSQLEngine
the Save will return the number of entities to be updated. In the case where the item exists but doesn't need to be updatedInMemoryEngine
returns 1 andSQLEngine
returns 0. The 0 returned fromSQLEngine
then prompts the Insert.Save()
return values:Save()
!=Exists()
inSQLEngine
is there a better method to check whether something already exists inInsertOrUpdate()
or shouldSave()
change so that is is synonymous with exists.Either way
InMemoryEngine
andSQLEngine
should give the same results.The text was updated successfully, but these errors were encountered: