{"record":{"id":"fc2b3c9419988352","repo":"hibernate/hibernate-orm","slug":"argument-of-s-is-not-a-plural-path-s","errorCode":null,"errorMessage":"Argument of '%s' is not a plural path '%s'","messagePattern":"Argument of '(.+?)' is not a plural path '(.+?)'","errorType":"exception","errorClass":"FunctionArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java","lineNumber":6147,"sourceCode":"\t\t\t\t\t\t\tprotected void reset() {\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t\ttry {\n\t\t\t\t\tresult = consumeDomainPath( identCtx );\n\t\t\t\t}\n\t\t\t\tfinally {\n\t\t\t\t\tdotIdentifierConsumerStack.pop();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate void checkPluralPath(SqmPath<?> pluralAttributePath, SqmPathSource<?> referencedPathSource, TerminalNode firstNode) {\n\t\tif ( !( referencedPathSource instanceof PluralPersistentAttribute<?, ?, ?> ) ) {\n\t\t\tthrow new FunctionArgumentException(\n\t\t\t\t\tString.format(\n\t\t\t\t\t\t\t\"Argument of '%s' is not a plural path '%s'\",\n\t\t\t\t\t\t\tfirstNode.getSymbol().getText(),\n\t\t\t\t\t\t\tpluralAttributePath.getNavigablePath()\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate SqmPath<?> consumeDomainPath(HqlParser.PathContext parserPath) {\n\t\tfinal var consumedPart = (SemanticPathPart) parserPath.accept( this );\n\t\tif ( consumedPart instanceof SqmPath<?> sqmPath ) {\n\t\t\treturn sqmPath;\n\t\t}\n\t\telse {\n\t\t\tthrow new PathException( \"Expecting domain-model path, but found: \" + consumedPart );\n\t\t}\n\t}","sourceCodeStart":6129,"sourceCodeEnd":6165,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java#L6129-L6165","documentation":"Error \"Argument of '%s' is not a plural path '%s'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A collection-typed path is required but not found: Argument of '<value>' is not a plural path '<value>'","commonSituations":"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.","solutions":["The argument must be a plural (collection-valued) path. Pass a collection association path to the function."],"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"}