{{ ?? private static EntityTypeImpl<?> buildEntityType(PersistentClass persistentClass, MetadataContext context) { Class javaType = persistentClass.getMappedClass(); context.pushEntityWorkedOn(persistentClass); MappedSuperclass superMappedSuperclass = persistentClass.getSuperMappedSuperclass(); Object superType = superMappedSuperclass == null?null:locateOrBuildMappedsuperclassType(superMappedSuperclass, context); if(superType == null) { PersistentClass entityType = persistentClass.getSuperclass(); superType = entityType == null?null:locateOrBuildEntityType(entityType, context); }
EntityTypeImpl entityType1 = new EntityTypeImpl(javaType, (AbstractIdentifiableType)superType, persistentClass); context.registerEntityType(persistentClass, entityType1); context.popEntityWorkedOn(persistentClass); return entityType1; } ?? }}
In row {{Object superType = superMappedSuperclass == null?null:locateOrBuildMappedsuperclassType(superMappedSuperclass, context);}} we take base class from MetadaContext if it already create.
If this base class have fields with generic types we always get this field with attributeType, which was in first created entity. But we can have diffrent inheritor with diffrent generic parametrs. |
|