File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
hibernate-core/src/main/java/org/hibernate/tuple/entity Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ public class EntityMetamodel implements Serializable {
8383
8484 private final String name ;
8585 private final String rootName ;
86- private EntityType entityType ;
86+ private final EntityType entityType ;
8787
8888 private final int subclassId ;
8989 private final IdentifierProperty identifierAttribute ;
@@ -175,6 +175,8 @@ public EntityMetamodel(
175175 //noinspection ResultOfMethodCallIgnored
176176 rootName .hashCode ();
177177
178+ entityType = new ManyToOneType ( name , creationContext .getTypeConfiguration () );
179+
178180 subclassId = persistentClass .getSubclassId ();
179181
180182 identifierAttribute =
@@ -755,9 +757,6 @@ public int getSubclassId() {
755757 }
756758
757759 public EntityType getEntityType () {
758- if ( entityType == null ) {
759- entityType = new ManyToOneType ( name , getSessionFactory ().getTypeConfiguration () );
760- }
761760 return entityType ;
762761 }
763762
You can’t perform that action at this time.
0 commit comments