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
Although supporting this was a neat idea, this change now requires that I delete the version from any entity I loaded from the database before saving it.
#9218
Closed
acuthbert opened this issue
Jul 19, 2022
· 0 comments
Although supporting this was a neat idea, this change now requires that I delete the version from any entity I loaded from the database before saving it.
Which by itself isn't that big of a deal, except in the case where I'm saving an entity without having updated any other fields (from a client request), save() skips the update as it should, which is fine except the same entity with the version removed gets returned.
This can lead to all sort of issues since you expect the entity returned by save() to always represent the information that's in the database.
So now to get the same behavior as before I practically have to re-implement the same mechanism as save() and check if the object was modified before deleting the version from the object and calling save()...
Although supporting this was a neat idea, this change now requires that I delete the version from any entity I loaded from the database before saving it.
Which by itself isn't that big of a deal, except in the case where I'm saving an entity without having updated any other fields (from a client request), save() skips the update as it should, which is fine except the same entity with the version removed gets returned.
This can lead to all sort of issues since you expect the entity returned by save() to always represent the information that's in the database.
So now to get the same behavior as before I practically have to re-implement the same mechanism as save() and check if the object was modified before deleting the version from the object and calling save()...
Originally posted by @Malbeth81 in #3271 (comment)
The text was updated successfully, but these errors were encountered: