From af3231820abfaa14ba5f7b23bfcb58aaa5dfd120 Mon Sep 17 00:00:00 2001 From: Andrea Boriero Date: Mon, 9 Sep 2019 10:32:17 +0100 Subject: [PATCH] HHH-13611 : Restore EntityMetamodel constructor to take SessionFactoryImplementor argument instead of PersisterCreationContext --- .../org/hibernate/persister/entity/AbstractEntityPersister.java | 2 +- .../test/java/org/hibernate/test/legacy/CustomPersister.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java index 37c82f68f9..0f2da77194 100644 --- a/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java +++ b/hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java @@ -556,7 +556,7 @@ public abstract class AbstractEntityPersister this.naturalIdRegionAccessStrategy = null; } - this.entityMetamodel = new EntityMetamodel( persistentClass, this, creationContext.getSessionFactory() ); + this.entityMetamodel = new EntityMetamodel( persistentClass, this, factory ); this.entityTuplizer = this.entityMetamodel.getTuplizer(); if ( entityMetamodel.isMutable() ) { diff --git a/hibernate-core/src/test/java/org/hibernate/test/legacy/CustomPersister.java b/hibernate-core/src/test/java/org/hibernate/test/legacy/CustomPersister.java index a486c7219d..68d676d84a 100644 --- a/hibernate-core/src/test/java/org/hibernate/test/legacy/CustomPersister.java +++ b/hibernate-core/src/test/java/org/hibernate/test/legacy/CustomPersister.java @@ -71,7 +71,7 @@ public class CustomPersister implements EntityPersister { NaturalIdDataAccess naturalIdRegionAccessStrategy, PersisterCreationContext creationContext) { this.factory = creationContext.getSessionFactory(); - this.entityMetamodel = new EntityMetamodel( model, this, creationContext.getSessionFactory() ); + this.entityMetamodel = new EntityMetamodel( model, this, factory ); } public boolean hasLazyProperties() {