Skip to content

Add AbstractEntityPersister#isNonLazyFieldName #10694

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

Merged
merged 2 commits into from
Aug 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1576,11 +1576,16 @@
final EntityEntry entry,
final String fieldName,
final SharedSessionContractImplementor session) {
return nonLazyPropertyNames.contains( fieldName )
return isNonLazyPropertyName( fieldName )
? initLazyProperty( entity, id, entry, fieldName, session )
: initLazyProperties( entity, id, entry, fieldName, session );
}

// Hibernate Reactive uses this
protected boolean isNonLazyPropertyName(String fieldName) {
return nonLazyPropertyNames.contains( fieldName );
}

private Object initLazyProperties(
Object entity,
Object id,
Expand Down Expand Up @@ -1741,6 +1746,7 @@
return fieldName.equals( lazyPropertyNames[index] );
}

// Used by Hibernate Reactive
protected boolean initializeLazyProperty(
final String fieldName,
final Object entity,
Expand All @@ -1754,7 +1760,8 @@
return fieldName.equals( name );
}

private void initializeLazyProperty(Object entity, EntityEntry entry, Object propValue, int index, Type type) {
// Used by Hibernate Reactive
protected void initializeLazyProperty(Object entity, EntityEntry entry, Object propValue, int index, Type type) {

Check notice

Code scanning / CodeQL

Confusing overloading of methods Note

Method AbstractEntityPersister.initializeLazyProperty(..) could be confused with overloaded method
initializeLazyProperty
, since dispatch depends on static types.
setPropertyValue( entity, index, propValue );
final Object[] loadedState = entry.getLoadedState();
if ( loadedState != null ) {
Expand Down
Loading