hibernate/hibernate-orm · error · PathException

Could not resolve join path '" + fullPath + "'

Error message

Could not resolve join path '" + fullPath + "'

What it means

Error "Could not resolve join path '" + fullPath + "'" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/query/hql/internal/QualifiedJoinPathConsumer.java:383

		public void consumeIdentifier(String identifier, boolean isTerminal, boolean allowReuse) {
			if ( !path.isEmpty() ) {
				path.append( '.' );
			}
			path.append( identifier );
			if ( isTerminal ) {
				final String fullPath = path.toString();
				final var joinedEntityType =
						creationState.getCreationContext().getJpaMetamodel()
								.getHqlEntityReference( fullPath );
				if ( joinedEntityType == null ) {
					final var cteStatement = creationState.findCteStatement( fullPath );
					if ( cteStatement != null ) {
						//noinspection rawtypes,unchecked
						join = new SqmCteJoin( cteStatement, alias, joinType, sqmRoot );
						creationState.getCurrentProcessingState().getPathRegistry().register( join );
						return;
					}
					throw new PathException( "Could not resolve join path '" + fullPath + "'" );
				}

				assert ! ( joinedEntityType instanceof SqmPolymorphicRootDescriptor );

				if ( fetch ) {
					LOG.debugf( "Ignoring fetch on entity join: %s(%s)", joinedEntityType.getHibernateEntityName(), alias );
				}

				join = new SqmEntityJoin<>( joinedEntityType, alias, joinType, sqmRoot );
				creationState.getCurrentProcessingState().getPathRegistry().register( join );
			}
		}

		@Override
		public void consumeTreat(String typeName, boolean isTerminal) {
			throw new UnsupportedOperationException();
		}

View on GitHub (pinned to fad1729dce)

Solutions

  1. Verify each segment of the join path is a mapped association.
  2. Check aliases and attribute names in the path.

When it happens

Trigger: A name referenced in a mapping, query, or configuration cannot be resolved at runtime.

Common situations: Typos in entity/attribute/mapping names, missing mappings, or refactoring without updating references.


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