HHH-12268 : LazyInitializationException thrown from lazy collection when batch fetching enabled and owning entity refreshed with lock
HHH-12268 : Add imports back in because they are required for 5.3
This commit is contained in:
parent
d7af5ffbd6
commit
bc0f109540
|
@ -143,6 +143,9 @@ public abstract class AbstractLoadPlanBasedEntityLoader extends AbstractLoadPlan
|
|||
final QueryParameters qp = new QueryParameters();
|
||||
qp.setPositionalParameterTypes( types );
|
||||
qp.setPositionalParameterValues( ids );
|
||||
qp.setOptionalObject( optionalObject );
|
||||
qp.setOptionalEntityName( optionalEntityName );
|
||||
qp.setOptionalId( optionalId );
|
||||
qp.setLockOptions( lockOptions );
|
||||
|
||||
result = executeLoad(
|
||||
|
|
|
@ -230,9 +230,9 @@ public class EntityReferenceInitializerImpl implements EntityReferenceInitialize
|
|||
|
||||
// determine which entity instance to use. Either the supplied one, or instantiate one
|
||||
Object entityInstance = null;
|
||||
if ( isReturn &&
|
||||
context.shouldUseOptionalEntityInformation() &&
|
||||
context.getQueryParameters().getOptionalObject() != null ) {
|
||||
// If an "optional" instance with an EntityKey equal to entityKey is available
|
||||
// in the context, then use that instance.
|
||||
if ( isReturn && context.getQueryParameters().getOptionalObject() != null ) {
|
||||
final EntityKey optionalEntityKey = ResultSetProcessorHelper.getOptionalObjectKey(
|
||||
context.getQueryParameters(),
|
||||
context.getSession()
|
||||
|
|
Loading…
Reference in New Issue