mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 16:44:57 +00:00
HHH-16966 StackOverFlowError with @ManyToOne and @Proxy( lazy=false )
This commit is contained in:
parent
8805f8e933
commit
c2fd263318
@ -141,12 +141,8 @@ else if ( creationState.isDynamicInstantiation() ) {
|
||||
}
|
||||
|
||||
private static boolean canBatchInitializeBeUsed(EntityPersister entityPersister) {
|
||||
if ( entityPersister.getRepresentationStrategy().getProxyFactory() == null
|
||||
&& entityPersister.hasSubclasses() ) {
|
||||
// We cannot neither create a proxy nor instantiate the entity because we don't know the concrete type
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
// we need to create a Proxy in order to use batch initialize
|
||||
return entityPersister.getRepresentationStrategy().getProxyFactory() != null;
|
||||
}
|
||||
|
||||
enum BatchMode {
|
||||
|
Loading…
x
Reference in New Issue
Block a user