Fix broken Session#refresh() method
This commit is contained in:
parent
e27f6af4b9
commit
9c7d39abf1
|
@ -390,6 +390,18 @@ public abstract class AbstractEntityInitializer extends AbstractFetchParentAcces
|
|||
return;
|
||||
}
|
||||
|
||||
final SharedSessionContractImplementor session = rowProcessingState
|
||||
.getJdbcValuesSourceProcessingState()
|
||||
.getSession();
|
||||
|
||||
final PersistenceContext persistenceContext = session.getPersistenceContext();
|
||||
// Special case map proxy to avoid stack overflows
|
||||
// We know that a map proxy will always be of "the right type" so just use that object
|
||||
final LoadingEntityEntry existingLoadingEntry = persistenceContext
|
||||
.getLoadContexts()
|
||||
.findLoadingEntityEntry( entityKey );
|
||||
setIsOwningInitializer( entityKey.getIdentifier(), existingLoadingEntry );
|
||||
|
||||
if ( entityInstance != null ) {
|
||||
return;
|
||||
}
|
||||
|
@ -405,19 +417,7 @@ public abstract class AbstractEntityInitializer extends AbstractFetchParentAcces
|
|||
);
|
||||
}
|
||||
|
||||
final SharedSessionContractImplementor session = rowProcessingState
|
||||
.getJdbcValuesSourceProcessingState()
|
||||
.getSession();
|
||||
|
||||
final PersistenceContext persistenceContext = session.getPersistenceContext();
|
||||
final Object proxy = getProxy( persistenceContext );
|
||||
// Special case map proxy to avoid stack overflows
|
||||
// We know that a map proxy will always be of "the right type" so just use that object
|
||||
final LoadingEntityEntry existingLoadingEntry = persistenceContext
|
||||
.getLoadContexts()
|
||||
.findLoadingEntityEntry( entityKey );
|
||||
setIsOwningInitializer(entityKey.getIdentifier(), existingLoadingEntry );
|
||||
|
||||
final Object entityInstanceFromExecutionContext = rowProcessingState.getJdbcValuesSourceProcessingState()
|
||||
.getExecutionContext()
|
||||
.getEntityInstance();
|
||||
|
|
Loading…
Reference in New Issue