Skip to content

Testcase for merge with eager association #952

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 1 commit into from

Conversation

DavideD
Copy link
Member

@DavideD DavideD commented Sep 3, 2021

Testcase for #951

@gavinking
Copy link
Member

I'm looking at it now.

@gavinking
Copy link
Member

gavinking commented Sep 3, 2021

Hrm. Well, I see what's happening.

Basically, Hibernate is merging the properties of the CampusDBO, and finds the reference to the (proxy) AcademicYearDetailsDBO. Now, it wants to swap that reference for a ref to a managed AcademicYearDetailsDBO. Since the association is nonlazy, it loads it. I can't say that's wrong. It would probably be "surprising" for a non-lazy association to hold a ref to a proxy.

So the problem is that the method that does the swapping (TypeHelper.replace()) is nonreactive, and it might be hard to make it reactive.

So this is a bug, and one that might take some work to fix.

On the other hand I think we dealt with a very similar issue in #506 and there is code at ReactiveResultSetProcessor:75 which does something quite similar to what I guess we must need to do here. So perhaps it's not so bad.

@gavinking
Copy link
Member

Closing, superseded by #954.

@gavinking gavinking closed this Sep 4, 2021
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