Skip to content

Nh 3771 - Batch Update with Optimistic Locking control. #467

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from

Conversation

montagutcarlos
Copy link
Contributor

https://nhibernate.jira.com/browse/NH-3771

This is a suggestion for batch update when optimistic control. Now, when
version control is active, batch update is not done, see the fixture (3771).
This is a down side in performance.

We made the change, and run the tests. The diference is that
StaleStateException is thrown instead of StaleObjectStateException, in
which case we loose the information regarding the entity and it's id
that comes with the exception. In our application, this is not a big problem, compare with the
possibility of doing a batch operation instead a single one.

We have been looking at the source code, and will be a possibility to
still get a class and a group of id's on the batcher to generate a more
accurate exception.

Please, let me know if this will be of intereset, so i can go deeper in
that aproach, or if you see another aproach that you will suggest.

hazzik and others added 4 commits March 1, 2016 00:02
This is a suggestion for batch update when optimistic control. Now, when
version control is active, batch update is not done, see the fixture.
This is a down side in performance.

We made the change, and run the tests. The diference is that
StaleStateException is thrown instead of StaleObjectStateException, in
which case we loose the information regarding the entity and it's id
that generate the exception.

In our application, this is not a big problem, compare with the
possibility of doing a batch operation instead a single one.

We have been looking at the source code, and will be a possibility to
still get a class and a group of id's on the batcher to generate a more
accurate exception.

Please, let me know if this will be of intereset, so i can go deeper in
that aproach, or if you see another aproach that you will suggest.
…-3771

# Conflicts:
#	src/NHibernate.Test/DriverTest/FirebirdClientDriverFixture.cs
If the driver doesn't support batching will throw a StaleObjectState
andif does StaleState...

Is possible to modify the batcher to throw an StaleObjectState exception
in this case... let me know if it's worth it to go in this direction.
@oskarb
Copy link
Member

oskarb commented Nov 20, 2016

The 7290c0d commit should not really be a port of this should it? At least, that change appears to already be on master under a different commit id. Rebase?

@hazzik
Copy link
Member

hazzik commented Feb 12, 2017

Hi @tikuna, can you please enable Allow edits from maintainers feature?

@montagutcarlos
Copy link
Contributor Author

Hi @hazzik . Done it. Sorry for the delay with the request of @oskarb . I'm pretty new to git and take me lot of time to understand what exactly should I done.

@hazzik
Copy link
Member

hazzik commented Apr 26, 2017

I would prefer this to be implemented as "isJdbcBatchVersionedData" (the better name is welcome).

@hazzik
Copy link
Member

hazzik commented Apr 26, 2017

Replaced by #606

@hazzik hazzik closed this Apr 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants