hibernate-orm
hibernate-orm copied to clipboard
Restore hibernate.jdbc.batch_versioned_data function.
batch_versioned_data=false is particularly useful to enable reporting the exact entity that failed optimistic lock.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion. For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-18621
Thanks for your pull request!
This pull request appears to follow the contribution rules.
› This message was automatically generated.
I feel like this might be covering https://hibernate.atlassian.net/browse/HHH-10501. May I use it as the required Jira reference?
I feel like this might be covering https://hibernate.atlassian.net/browse/HHH-10501.
It is not.
May I use it as the required Jira reference?
No, please open a new issue with a proper description of the problem you're fixing. Thanks.
batch_versioned_data=false is particularly useful to enable reporting the exact entity that failed optimistic lock.
Since HHH-18586, Hibernate 7 reports a proper StaleObjectStateException when a batch update fails.
Which means that your test will pass even without this fix.
(FTR, the actual fix looks reasonable to me, though I'm not an expert on that code.)
Thanks for the contribution, but without a test for the functionality I could not apply the fix. Instead I decided to remove the functionality: https://github.com/hibernate/hibernate-orm/pull/9717