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;
|
protected final BasicEntityPropertyMapping propertyMapping;
|
||||||
|
|
||||||
|
private final boolean implementsLifecycle;
|
||||||
|
|
||||||
@Deprecated(since = "6.0")
|
@Deprecated(since = "6.0")
|
||||||
public AbstractEntityPersister(
|
public AbstractEntityPersister(
|
||||||
|
@ -504,6 +505,7 @@ public abstract class AbstractEntityPersister
|
||||||
|
|
||||||
javaType = representationStrategy.getLoadJavaType();
|
javaType = representationStrategy.getLoadJavaType();
|
||||||
assert javaType != null;
|
assert javaType != null;
|
||||||
|
this.implementsLifecycle = Lifecycle.class.isAssignableFrom( javaType.getJavaTypeClass() );
|
||||||
|
|
||||||
final Dialect dialect = creationContext.getDialect();
|
final Dialect dialect = creationContext.getDialect();
|
||||||
|
|
||||||
|
@ -4107,7 +4109,7 @@ public abstract class AbstractEntityPersister
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean implementsLifecycle() {
|
public boolean implementsLifecycle() {
|
||||||
return Lifecycle.class.isAssignableFrom( getMappedClass() );
|
return this.implementsLifecycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue