hibernate/hibernate-orm · error · FunctionArgumentException

Path '" + ctx.path().getText() + "' resolved to a joined lis

Error message

Path '" + ctx.path().getText() + "' resolved to a joined list instead of a compound path

What it means

Error "Path '" + ctx.path().getText() + "' resolved to a joined list instead of a compound path" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java:5689

		if ( path instanceof SqmPluralValuedSimplePath<?> pluralPath ) {
			if ( isIndexedPluralAttribute( pluralPath ) ) {
				return new SqmIndexAggregateFunction<>( pluralPath, functionName );
			}
			else {
				throw new FunctionArgumentException( "Path '" + ctx.path()
						+  "' resolved to '"
						+ pluralPath.getReferencedPathSource()
						+ "' which is not an indexed collection" );
			}
		}
		else {
			// indices() and keys() only apply to compound paths
			if ( path instanceof SqmMapJoin ) {
				throw new FunctionArgumentException( "Path '" + ctx.path().getText()
						+ "' resolved to a joined map instead of a compound path" );
			}
			else if ( path instanceof SqmListJoin ) {
				throw new FunctionArgumentException( "Path '" + ctx.path().getText()
						+ "' resolved to a joined list instead of a compound path" );
			}
			else {
				throw new FunctionArgumentException( "Path '" + ctx.path().getText()
						+ "' did not resolve to a many-valued attribute" );
			}
		}
	}

	@Override
	public SqmSubQuery<?> visitSubqueryExpression(HqlParser.SubqueryExpressionContext ctx) {
		return visitSubquery( (HqlParser.SubqueryContext) ctx.getChild( 1 ) );
	}

	@Override
	public SqmSubQuery<?> visitSubquery(HqlParser.SubqueryContext ctx) {
		final var queryExpressionContext = ctx.queryExpression();
		final var subQuery = new SqmSubQuery<>(

View on GitHub (pinned to fad1729dce)

Solutions

  1. The path resolved to a joined list where a compound path was expected. Index the list or join its elements explicitly.

When it happens

Trigger: A runtime precondition of the Hibernate query API is violated: Path '" + ctx.path().getText() + "' resolved to a joined list instead of a compound path

Common situations: Application code or configuration calls the query API in a way that violates its documented contract; the interpolated values in the message identify the offending input.


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