Hello everybody,
I have a web application, which uses the session-per-request pattern.
I load an object (and also its children) in a session for user to modify it. After that, I save it to db in another session, this make the version of parent increased and its children's version increased, too. The problem occurs when there is an exception occurs (ex: constraint violation) so the update sql fail, but the versions were increased.
So I want to ask If there is a way to prevent the increasing of children's version when update parent? and If there is a way to prevent the increasing of version(both parent and children) when an update fail?
Thanks a lot
|