hibernate/hibernate-orm · error · QueryException

Could not resolve property: ${propertyName} of: ${entityName

Error message

Could not resolve property: ${propertyName} of: ${entityName}

What it means

Error "Could not resolve property: ${propertyName} of: ${entityName}" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/persister/entity/AbstractEntityPersister.java:4731

	}

	/**
	 * {@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).
	 *
	 * @deprecated by the supertypes
	 */
	@Override @Deprecated
	public Type getPropertyType(String propertyName) throws MappingException {
		final var propertyPath = resolvePropertyPath( propertyName );
		if ( propertyPath == null ) {
			throw new QueryException( "Could not resolve property: " + propertyName + " of: " + getEntityName() );
		}
		return propertyPath.type();
	}

	@Override
	public boolean isSelectBeforeUpdateRequired() {
		return isSelectBeforeUpdate();
	}

	public final OptimisticLockStyle optimisticLockStyle() {
		return getOptimisticLockStyle();
	}

	@Override
	public Object createProxy(Object id, SharedSessionContractImplementor session) throws HibernateException {
		return representationStrategy.getProxyFactory().getProxy( id, session );
	}

View on GitHub (pinned to fad1729dce)

Solutions

  1. Fix the property path in the query: the named property must exist on the named entity.
  2. Check for typos and for properties renamed in the entity.

When it happens

Trigger: Thrown when property access (e.g. for a filter, fetch profile, or HQL path) names a property not defined on the entity.

Common situations: See trigger scenarios.


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