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/AbstractEmbeddableMapping.java:481

			}
			else if ( subtype instanceof EntityType ) {
				attributeMapping = MappingModelCreationHelper.buildSingularAssociationAttributeMapping(
						bootPropertyDescriptor.getName(),
						navigableRole.append( bootPropertyDescriptor.getName() ),
						attributeIndex,
						attributeIndex,
						bootPropertyDescriptor,
						this,
						creationProcess.getEntityPersister( bootDescriptor.getOwner().getEntityName() ),
						(EntityType) subtype,
						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()
						)
				);
			}

			attributeConsumer.accept( attributeMapping );

			attributeIndex++;
		}

		completionCallback.success();
		return true;
	}

View on GitHub (pinned to fad1729dce)

Solutions

  1. Check the mapping of the named attribute: it must be resolvable as basic, embedded, to-one, or plural. Fix conflicting annotations on the attribute.

When it happens

Trigger: Thrown during metamodel building when an embeddable attribute's nature (basic, to-one, plural, any) cannot be determined from its mapping.

Common situations: See trigger scenarios.


AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22). Data as JSON: /api/errors/5c180374bec82129. Report an issue: GitHub.