Search in sources :

Example 1 with InheritanceType

use of org.hibernate.boot.model.source.spi.InheritanceType in project hibernate-orm by hibernate.

the class EntityHierarchySourceImpl method processSubclass.

public void processSubclass(SubclassEntitySourceImpl subclassEntitySource) {
    final InheritanceType inheritanceType = Helper.interpretInheritanceType(subclassEntitySource.jaxbEntityMapping());
    if (hierarchyInheritanceType == InheritanceType.NO_INHERITANCE) {
        hierarchyInheritanceType = inheritanceType;
    } else if (hierarchyInheritanceType != inheritanceType) {
        throw new MappingException("Mixed inheritance strategies not supported", subclassEntitySource.getOrigin());
    }
    collectedEntityNames.add(subclassEntitySource.getEntityNamingSource().getEntityName());
}
Also used : InheritanceType(org.hibernate.boot.model.source.spi.InheritanceType) MappingException(org.hibernate.boot.MappingException)

Aggregations

MappingException (org.hibernate.boot.MappingException)1 InheritanceType (org.hibernate.boot.model.source.spi.InheritanceType)1