{"record":{"id":"78c0466d7fb76276","repo":"hibernate/hibernate-orm","slug":"could-not-interpret-path-expression-pathsofar","errorCode":null,"errorMessage":"Could not interpret path expression '\" + pathSoFar + \"'","messagePattern":"Could not interpret path expression '\" \\+ pathSoFar \\+ \"'","errorType":"exception","errorClass":"SemanticException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/hql/internal/BasicDotIdentifierConsumer.java","lineNumber":180,"sourceCode":"\t\t\tfinal SemanticPathPart literalType =\n\t\t\t\t\tresolveLiteralType( jpaMetamodel, nodeBuilder );\n\t\t\tif ( literalType != null ) {\n\t\t\t\treturn literalType;\n\t\t\t}\n\n\t\t\tfinal SqmFunctionDescriptor functionDescriptor =\n\t\t\t\t\tresolveFunction( queryEngine );\n\t\t\tif ( functionDescriptor != null ) {\n\t\t\t\treturn functionDescriptor.generateSqmExpression( null, queryEngine );\n\t\t\t}\n\n\t\t\tfinal SemanticPathPart literalJava =\n\t\t\t\t\tresolveLiteralJavaElement( jpaMetamodel, nodeBuilder );\n\t\t\tif ( literalJava != null ) {\n\t\t\t\treturn literalJava;\n\t\t\t}\n\n\t\t\tthrow new SemanticException( \"Could not interpret path expression '\" + pathSoFar + \"'\" );\n\t\t}\n\n\t\tprivate SemanticPathPart resolvePath(String identifier, boolean isTerminal, SqmCreationState creationState) {\n\t\t\tfinal SqmPathRegistry sqmPathRegistry =\n\t\t\t\t\tcreationState.getProcessingStateStack().getCurrent()\n\t\t\t\t\t\t\t.getPathRegistry();\n\n\t\t\tfinal SqmFrom<?,?> pathRootByAlias =\n\t\t\t\t\tsqmPathRegistry.findFromByAlias( identifier, true );\n\t\t\tif ( pathRootByAlias != null ) {\n\t\t\t\t// identifier is an alias (identification variable)\n\t\t\t\tvalidateAsRoot( pathRootByAlias );\n\t\t\t\treturn isTerminal ? pathRootByAlias : new DomainPathPart( pathRootByAlias );\n\t\t\t}\n\n\t\t\tfinal SqmFrom<?, ?> pathRootByExposedNavigable =\n\t\t\t\t\tsqmPathRegistry.findFromExposing( identifier );\n\t\t\tif ( pathRootByExposedNavigable != null ) {","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/hql/internal/BasicDotIdentifierConsumer.java#L162-L198","documentation":"Error \"Could not interpret path expression '\" + pathSoFar + \"'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A runtime precondition of the Hibernate API is violated.","commonSituations":"Occurs when application code or configuration does not satisfy the documented contract of the API being called.","solutions":["Verify each segment of the dotted path corresponds to a mapped attribute.","Check entity/attribute names for typos."],"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"}