hibernate/hibernate-orm · error · FunctionArgumentException
Parameter %d of function '%s()' has type '%s', but argument
Error message
Parameter %d of function '%s()' has type '%s', but argument is a tuple
What it means
Error "Parameter %d of function '%s()' has type '%s', but argument is a tuple" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/query/sqm/produce/function/ArgumentTypesValidator.java:297
);
}
else {
throw new FunctionArgumentException(
String.format(
"Parameter %d of function '%s()' has type '%s', but argument is of type '%s' mapped to '%s'",
paramNumber,
functionName,
type,
javaType.getTypeName(),
sqlType
)
);
}
}
private static void throwTupleError(
FunctionParameterType type, String functionName, int paramNumber) {
throw new FunctionArgumentException(
String.format(
"Parameter %d of function '%s()' has type '%s', but argument is a tuple",
paramNumber,
functionName,
type
)
);
}
@Override
public String getSignature() {
String sig = delegate.getSignature();
for (int i=0; i<types.length; i++) {
String argName = types.length == 1 ? "arg" : "arg" + i;
sig = sig.replace( argName, types[i] + " " + argName );
}
return sig;
}View on GitHub (pinned to fad1729dce)
Solutions
- A tuple (multi-valued) expression was passed where the function parameter expects a single value of the given type.
- Pass a single-valued expression or select the tuple element you need.
When it happens
Trigger: A function call in a query supplies arguments that violate the function's signature.
Common situations: Passing the wrong number or types of arguments (e.g. untyped nulls, tuples) to HQL/SQL functions.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/1d83a28dc9f7bbd1.
Report an issue: GitHub.