Skip to content

HHH-19495 Remove the default "true" from optimistic-lock in the mapping xsd #10295

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

marko-bekhta
Copy link
Member

@marko-bekhta marko-bekhta commented Jun 6, 2025

so that no extra annotations are added unless explicitly defined.

[Please describe here what your change is about]


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-19528
https://hibernate.atlassian.net/browse/HHH-19495

Copy link
Member

@mbellade mbellade left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @marko-bekhta, thanks! I'm guessing that just by having the OptimisticLock annotation we were triggering an additional version update statement, correct?

Have you also tried looking into the hasCascades behavior that was mentioned in the issue?

It would be great to have a test in ORM for this. Would you be able to isolate one from the issuer's reproducer?

so that no extra annotations are added unless explicitly defined.
@marko-bekhta marko-bekhta force-pushed the fix/HHH-19495-remove-default-optisitc-locking-from-orm-mapping branch from 9aee5bb to 6eb6f5c Compare June 9, 2025 13:11
this.id = id;
}

public List<ConsumerItem> getConsumerItems() {

Check notice

Code scanning / CodeQL

Exposing internal representation Note test

getConsumerItems exposes the internal representation stored in field consumerItems. The value may be modified
after this call to getConsumerItems
.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😟 🤯

@marko-bekhta
Copy link
Member Author

there's an extra commit in there, @dreab8 and I discovered that XML version was ignored in 7 so added something to handle it.

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.

2 participants