Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

HHH-19716 Set the collection owner when wrapping a collection into a persistent one #10778

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
marko-bekhta wants to merge 1 commit into hibernate:main
base: main
Choose a base branch
Loading
from marko-bekhta:fix/HHH-19716-Collection-event-listeners-may-be-missing-collection-owners-in-the-persistent-collection

Conversation

Copy link
Member

@marko-bekhta marko-bekhta commented Aug 19, 2025

https://hibernate.atlassian.net/browse/HHH-19716

It doesn't look like wrap() is called by Reactive directly, so it seems safe to update the method, no?


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.


Comment on lines 106 to +108
public void onPostRemoveCollection(PostCollectionRemoveEvent event) {
assertThat( event.getAffectedOwnerOrNull() ).isNotNull();
assertThat( event.getCollection().getOwner() ).isNotNull();
Copy link
Member

Choose a reason for hiding this comment

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

We want the owner to be non-null after a remove?

Copy link
Member Author

@marko-bekhta marko-bekhta Aug 25, 2025

Choose a reason for hiding this comment

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

that ... idk 🤷🏻 🙂
wouldn't we want to know to what the collection belonged to before it was removed?
My thinking is that event.getAffectedOwnerOrNull() == event.getCollection().getOwner()

Copy link
Member

Choose a reason for hiding this comment

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

If you're sure this is pre-existing behavior and we don't need to change it to fix the bug, fine by me.

@marko-bekhta marko-bekhta force-pushed the fix/HHH-19716-Collection-event-listeners-may-be-missing-collection-owners-in-the-persistent-collection branch from 2ef4bdd to 23f9fac Compare August 25, 2025 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@yrodiere yrodiere yrodiere left review comments

@beikov beikov beikov approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /