{"record":{"id":"02fd5fac03cddaeb","repo":"hibernate/hibernate-orm","slug":"specified-attribute-s-s-must-be-basic-s","errorCode":null,"errorMessage":"Specified attribute [%s.%s] must be basic: %s","messagePattern":"Specified attribute \\[(.+?)\\.(.+?)\\] must be basic: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/results/internal/dynamic/DynamicResultBuilderAttribute.java","lineNumber":42,"sourceCode":"/**\n * DynamicResultBuilder based on a named mapped attribute\n *\n * @author Steve Ebersole\n */\npublic class DynamicResultBuilderAttribute implements DynamicResultBuilder, NativeQuery.ReturnProperty {\n\tprivate final BasicAttributeMapping attributeMapping;\n\tprivate final String columnAlias;\n\tprivate final String entityName;\n\tprivate final String attributePath;\n\n\tpublic DynamicResultBuilderAttribute(\n\t\t\tSingularAttributeMapping attributeMapping,\n\t\t\tString columnAlias,\n\t\t\tString entityName,\n\t\t\tString attributePath) {\n\t\tfinal boolean allowable = attributeMapping instanceof BasicAttributeMapping;\n\t\tif ( !allowable ) {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\tString.format(\n\t\t\t\t\t\t\tLocale.ROOT,\n\t\t\t\t\t\t\t\"Specified attribute [%s.%s] must be basic: %s\",\n\t\t\t\t\t\t\tentityName,\n\t\t\t\t\t\t\tattributePath,\n\t\t\t\t\t\t\tattributeMapping\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\tthis.attributeMapping = (BasicAttributeMapping) attributeMapping;\n\t\tthis.columnAlias = columnAlias;\n\t\tthis.entityName = entityName;\n\t\tthis.attributePath = attributePath;\n\t}\n\n\t@Override\n\tpublic Class<?> getJavaType() {","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/results/internal/dynamic/DynamicResultBuilderAttribute.java#L24-L60","documentation":"Error \"Specified attribute [%s.%s] must be basic: %s\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A runtime precondition of the Hibernate query API is violated: Specified attribute [<value>.<value>] must be basic: <value>","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 specified attribute must be basic. Use a column-mapped basic attribute."],"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"}