hibernate/hibernate-orm · error · FunctionArgumentException

Argument of '%s' is not a plural path '%s'

Error message

Argument of '%s' is not a plural path '%s'

What it means

Error "Argument of '%s' is not a plural path '%s'" thrown in hibernate/hibernate-orm.

Source

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

							protected void reset() {
							}
						}
				);
				try {
					result = consumeDomainPath( identCtx );
				}
				finally {
					dotIdentifierConsumerStack.pop();
				}
			}
		}

		return result;
	}

	private void checkPluralPath(SqmPath<?> pluralAttributePath, SqmPathSource<?> referencedPathSource, TerminalNode firstNode) {
		if ( !( referencedPathSource instanceof PluralPersistentAttribute<?, ?, ?> ) ) {
			throw new FunctionArgumentException(
					String.format(
							"Argument of '%s' is not a plural path '%s'",
							firstNode.getSymbol().getText(),
							pluralAttributePath.getNavigablePath()
					)
			);
		}
	}

	private SqmPath<?> consumeDomainPath(HqlParser.PathContext parserPath) {
		final var consumedPart = (SemanticPathPart) parserPath.accept( this );
		if ( consumedPart instanceof SqmPath<?> sqmPath ) {
			return sqmPath;
		}
		else {
			throw new PathException( "Expecting domain-model path, but found: " + consumedPart );
		}
	}

View on GitHub (pinned to fad1729dce)

Solutions

  1. The argument must be a plural (collection-valued) path. Pass a collection association path to the function.

When it happens

Trigger: A collection-typed path is required but not found: Argument of '<value>' is not a plural path '<value>'

Common situations: Applying collection operations (elements/indices/key/value/index, slice, member of) to singular paths, or to joined lists/maps that are not compound/indexed paths.


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