HHH-16685 Avoid extreme cache misses on EntityPersister#implementsLifecycle()
This commit is contained in:
parent
5c60b632a1
commit
57cbaed2a9
|
@ -450,6 +450,7 @@ public abstract class AbstractEntityPersister
|
|||
*/
|
||||
protected final BasicEntityPropertyMapping propertyMapping;
|
||||
|
||||
private final boolean implementsLifecycle;
|
||||
|
||||
@Deprecated(since = "6.0")
|
||||
public AbstractEntityPersister(
|
||||
|
@ -504,6 +505,7 @@ public abstract class AbstractEntityPersister
|
|||
|
||||
javaType = representationStrategy.getLoadJavaType();
|
||||
assert javaType != null;
|
||||
this.implementsLifecycle = Lifecycle.class.isAssignableFrom( javaType.getJavaTypeClass() );
|
||||
|
||||
final Dialect dialect = creationContext.getDialect();
|
||||
|
||||
|
@ -4107,7 +4109,7 @@ public abstract class AbstractEntityPersister
|
|||
|
||||
@Override
|
||||
public boolean implementsLifecycle() {
|
||||
return Lifecycle.class.isAssignableFrom( getMappedClass() );
|
||||
return this.implementsLifecycle;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue