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

Better error message when transparently loading lazy fields #2513

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

Draft
dreab8 wants to merge 2 commits into hibernate:main
base: main
Choose a base branch
Loading
from dreab8:issue_1770_last

Conversation

Copy link
Member

@dreab8 dreab8 commented Sep 16, 2025

Fix #1770

This PR aims to intercept direct access to lazy fields in order to throw a better error message, see ReactiveEnhancementAsProxyLazinessInterceptor and ReactiveLazyAttributeLoadingInterceptor

This PR needs hibernate/hibernate-orm#10950

Copy link
Member

@DavideD DavideD left a comment

Choose a reason for hiding this comment

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

Thanks a lot,
a couple of things caught my eyes while giving it a very quick pass.

I will have a better look as soon as I finished with all the other non-draft PRs

} );
}
else {
return completedFuture( (T) entityPersister.getPropertyValue( entity, attributeName ) );
Copy link
Member

Choose a reason for hiding this comment

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

If I understand correctly, this change will prevent an extra query. Could you make sure we test for it?
Otherwise, future changes might remove the improvement.

dreab8 reacted with thumbs up emoji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@DavideD DavideD DavideD left review comments

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

Successfully merging this pull request may close these issues.

Check error message with lazy loading fields
2 participants

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