hibernate/hibernate-orm · error · MappingException
Unknown property: ${propertyName}
Error message
Unknown property: ${propertyName} What it means
Error "Unknown property: ${propertyName}" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java:2433
public String[] toColumns(String propertyName) throws QueryException {
return getPropertyColumnNames( propertyName );
}
/**
* {@inheritDoc}
*
* Warning:
* When there are duplicated property names in the subclasses
* then this method may return the wrong results.
* To ensure correct results, this method should only be used when
* {@literal this} is the concrete EntityPersister (since the
* concrete EntityPersister cannot have duplicated property names).
*/
@Override
public String[] getPropertyColumnNames(String propertyName) {
final var propertyPath = resolvePropertyPath( propertyName );
if ( propertyPath == null ) {
throw new MappingException( "Unknown property: " + propertyName );
}
return propertyPath.columnNames();
}
private DiscriminatorType<?> discriminatorDomainType;
@Override
public DiscriminatorType<?> getDiscriminatorDomainType() {
if ( discriminatorDomainType == null ) {
discriminatorDomainType = buildDiscriminatorType();
}
return discriminatorDomainType;
}
private DiscriminatorType<?> buildDiscriminatorType() {
final var discriminatorBasicType = getDiscriminatorType();
return discriminatorBasicType == null
? nullView on GitHub (pinned to fad1729dce)
Solutions
- Correct the property name in the query/mapping to one declared on the entity.
When it happens
Trigger: Thrown when a query or entity graph references a property name that does not exist on the entity.
Common situations: See trigger scenarios.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/324ba14dab6d5fa3.
Report an issue: GitHub.