{"record":{"id":"4d4849e430f6f894","repo":"hibernate/hibernate-orm","slug":"path-ctx-path-gettext-resolved-to-a","errorCode":null,"errorMessage":"Path '\" + ctx.path().getText() + \"' resolved to a joined map instead of a compound path","messagePattern":"Path '\" \\+ ctx\\.path\\(\\)\\.getText\\(\\) \\+ \"' resolved to a joined map instead of a compound path","errorType":"exception","errorClass":"FunctionArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java","lineNumber":5685,"sourceCode":"\t\t// the actual function name might be 'minindex' or 'maxindex', so trim it\n\t\tfinal String functionName = ctx.getChild(0).getText().substring(0, 3);\n\n\t\tfinal var path = consumePluralAttributeReference( ctx.path() );\n\t\tif ( path instanceof SqmPluralValuedSimplePath<?> pluralPath ) {\n\t\t\tif ( isIndexedPluralAttribute( pluralPath ) ) {\n\t\t\t\treturn new SqmIndexAggregateFunction<>( pluralPath, functionName );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new FunctionArgumentException( \"Path '\" + ctx.path()\n\t\t\t\t\t\t+  \"' resolved to '\"\n\t\t\t\t\t\t+ pluralPath.getReferencedPathSource()\n\t\t\t\t\t\t+ \"' which is not an indexed collection\" );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// indices() and keys() only apply to compound paths\n\t\t\tif ( path instanceof SqmMapJoin ) {\n\t\t\t\tthrow new FunctionArgumentException( \"Path '\" + ctx.path().getText()\n\t\t\t\t\t\t+ \"' resolved to a joined map instead of a compound path\" );\n\t\t\t}\n\t\t\telse if ( path instanceof SqmListJoin ) {\n\t\t\t\tthrow new FunctionArgumentException( \"Path '\" + ctx.path().getText()\n\t\t\t\t\t\t+ \"' resolved to a joined list instead of a compound path\" );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new FunctionArgumentException( \"Path '\" + ctx.path().getText()\n\t\t\t\t\t\t+ \"' did not resolve to a many-valued attribute\" );\n\t\t\t}\n\t\t}\n\t}\n\n\t@Override\n\tpublic SqmSubQuery<?> visitSubqueryExpression(HqlParser.SubqueryExpressionContext ctx) {\n\t\treturn visitSubquery( (HqlParser.SubqueryContext) ctx.getChild( 1 ) );\n\t}\n","sourceCodeStart":5667,"sourceCodeEnd":5703,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java#L5667-L5703","documentation":"Error \"Path '\" + ctx.path().getText() + \"' resolved to a joined map instead of a compound path\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A runtime precondition of the Hibernate query API is violated: Path '\" + ctx.path().getText() + \"' resolved to a joined map instead of a compound path","commonSituations":"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.","solutions":["The path resolved to a joined map where a compound path was expected. Use key()/value()/entry() or explicit map indexing."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}