Skip to content

Conversation

dreab8
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.

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.

Check error message with lazy loading fields
2 participants