hibernate/hibernate-orm · error · MappingException
Mixed inheritance strategies not supported
Error message
Mixed inheritance strategies not supported
What it means
Error "Mixed inheritance strategies not supported" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/model/source/internal/hbm/EntityHierarchySourceImpl.java:366
}
@Override
public InheritanceType getHierarchyInheritanceType() {
return hierarchyInheritanceType;
}
@Override
public RootEntitySourceImpl getRoot() {
return rootEntitySource;
}
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() );
}
protected JaxbHbmRootEntityType entityElement() {
return rootEntitySource.jaxbEntityMapping();
}
@Override
public IdentifierSource getIdentifierSource() {
return identifierSource;
}
@Override
public VersionAttributeSource getVersionAttributeSource() {
return versionAttributeSource;View on GitHub (pinned to fad1729dce)
Solutions
- Use a single inheritance strategy (table-per-class, joined, or union-subclass) throughout the entity hierarchy in the hbm.xml mappings.
Example fix
Use a single inheritance strategy (table-per-class, joined, or union-subclass) throughout the entity hierarchy in the hbm.xml mappings.
When it happens
Trigger: An hbm.xml / orm.xml mapping document violates a mapping rule during bootstrap.
Common situations: Legacy XML mappings with invalid combinations (column+formula, mixed inheritance, missing identifiers, bad extends references).
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/0a14530b41318402.
Report an issue: GitHub.