hibernate/hibernate-orm · error · MappingException
Unable to determine attribute nature : %s#%s
Error message
Unable to determine attribute nature : %s#%s
What it means
Error "Unable to determine attribute nature : %s#%s" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/metamodel/mapping/internal/EmbeddableMappingTypeImpl.java:637
}
else if ( subtype instanceof EntityType subentityType ) {
attributeMapping = buildSingularAssociationAttributeMapping(
bootPropertyDescriptor.getName(),
valueMapping.getNavigableRole().append( bootPropertyDescriptor.getName() ),
attributeIndex,
attributeIndex,
bootPropertyDescriptor,
this,
creationProcess.getEntityPersister( bootDescriptor.getOwner().getEntityName() ),
subentityType,
representationStrategy.resolvePropertyAccess( bootPropertyDescriptor ),
compositeType.getCascadeStyle( attributeIndex ),
creationProcess
);
columnPosition += bootPropertyDescriptor.getColumnSpan();
}
else {
throw new MappingException(
String.format(
Locale.ROOT,
"Unable to determine attribute nature : %s#%s",
bootDescriptor.getOwner().getEntityName(),
bootPropertyDescriptor.getName()
)
);
}
if ( isPolymorphic() ) {
final String declaringClass = bootDescriptor.getPropertyDeclaringClass( bootPropertyDescriptor );
for ( var entry : concreteEmbeddableBySubclass.entrySet() ) {
if ( isDefinedInClassOrSuperclass( bootDescriptor, declaringClass, entry.getKey() ) ) {
entry.getValue().declaredAttributes.set( attributeMapping.getStateArrayPosition() );
}
}
}
View on GitHub (pinned to fad1729dce)
Solutions
- Fix the attribute mapping so it can be classified (basic/embedded/to-one/plural); remove conflicting or unsupported annotations from the embeddable attribute.
When it happens
Trigger: Thrown during embeddable mapping type initialization when an attribute's nature cannot be classified from its value mapping.
Common situations: See trigger scenarios.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/281d36311cddab30.
Report an issue: GitHub.