{"record":{"id":"743e5e3f9eb6c540","repo":"hibernate/hibernate-orm","slug":"unknown-sort-order-value","errorCode":null,"errorMessage":"Unknown sort order: \" + value","messagePattern":"Unknown sort order: \" \\+ value","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/SortDirection.java","lineNumber":35,"sourceCode":"\tASCENDING,\n\tDESCENDING;\n\n\tpublic SortDirection reverse() {\n\t\treturn switch (this) {\n\t\t\tcase ASCENDING -> DESCENDING;\n\t\t\tcase DESCENDING -> ASCENDING;\n\t\t};\n\t}\n\n\tpublic static SortDirection interpret(String value) {\n\t\tif ( value == null ) {\n\t\t\treturn null;\n\t\t}\n\t\telse {\n\t\t\treturn switch ( value.toLowerCase(Locale.ROOT) ) {\n\t\t\t\tcase \"asc\", \"ascending\" -> ASCENDING;\n\t\t\t\tcase \"desc\", \"descending\" -> DESCENDING;\n\t\t\t\tdefault -> throw new IllegalArgumentException( \"Unknown sort order: \" + value );\n\t\t\t};\n\t\t}\n\t}\n}\n","sourceCodeStart":17,"sourceCodeEnd":40,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/SortDirection.java#L17-L40","documentation":"Error \"Unknown sort order: \" + value\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A name referenced in a mapping, query, or configuration cannot be resolved at runtime.","commonSituations":"Typos in entity/attribute/mapping names, missing mappings, or refactoring without updating references.","solutions":["Use 'asc' or 'desc' (case-insensitive) as the sort order string.","Map external sort strings to SortDirection explicitly."],"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"}