Skip to content

Commit 9352546

Browse files
barreirosebersole
authored andcommitted
HHH-8558 - Bytecode enhancer: skip creation of proxy factory
1 parent 8053fa7 commit 9352546

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hibernate-core/src/main/java/org/hibernate/tuple/entity/AbstractEntityTuplizer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public AbstractEntityTuplizer(EntityMetamodel entityMetamodel, PersistentClass m
153153

154154
instantiator = buildInstantiator( mappingInfo );
155155

156-
if ( entityMetamodel.isLazy() ) {
156+
if ( entityMetamodel.isLazy() && !entityMetamodel.isLazyLoadingBytecodeEnhanced() ) {
157157
proxyFactory = buildProxyFactory( mappingInfo, idGetter, idSetter );
158158
if ( proxyFactory == null ) {
159159
entityMetamodel.setLazy( false );
@@ -657,7 +657,7 @@ public final boolean isInstance(Object object) {
657657

658658
@Override
659659
public boolean hasProxy() {
660-
return entityMetamodel.isLazy();
660+
return entityMetamodel.isLazy() && !entityMetamodel.isLazyLoadingBytecodeEnhanced();
661661
}
662662

663663
@Override

0 commit comments

Comments
 (0)