{"record":{"id":"f3c7733974f6ccb7","repo":"hibernate/hibernate-orm","slug":"assignment-referred-to-column-of-a-joined-associat-f3c773","errorCode":null,"errorMessage":"Assignment referred to column of a joined association: ${columnReference}","messagePattern":"Assignment referred to column of a joined association: (.+?)","errorType":"exception","errorClass":"SemanticException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedInsertHandler.java","lineNumber":1011,"sourceCode":"\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tprivate TableReference resolveTableReference(\n\t\t\tColumnReference columnReference,\n\t\t\tMap<String, TableReference> tableReferenceByAlias) {\n\t\tif ( columnReference.getQualifier() == null ) {\n\t\t\t// This happens only for the special row_number column\n\t\t\treturn null;\n\t\t}\n\t\tfinal var tableReferenceByQualifier =\n\t\t\t\ttableReferenceByAlias.get( columnReference.getQualifier() );\n\t\tif ( tableReferenceByQualifier != null ) {\n\t\t\treturn tableReferenceByQualifier;\n\t\t}\n\n\t\tthrow new SemanticException( \"Assignment referred to column of a joined association: \" + columnReference );\n\t}\n\n\tprivate NamedTableReference resolveUnionTableReference(TableReference tableReference, String tableExpression) {\n\t\tif ( tableReference instanceof UnionTableReference ) {\n\t\t\treturn new NamedTableReference(\n\t\t\t\t\ttableExpression,\n\t\t\t\t\ttableReference.getIdentificationVariable(),\n\t\t\t\t\ttableReference.isOptional()\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\treturn (NamedTableReference) tableReference;\n\t\t}\n\t}\n\n\tpublic SqmInsertStatement<?> getSqmInsertStatement() {\n\t\treturn (SqmInsertStatement<?>) getSqmStatement();\n\t}","sourceCodeStart":993,"sourceCodeEnd":1029,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedInsertHandler.java#L993-L1029","documentation":"Error \"Assignment referred to column of a joined association: ${columnReference}\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An UPDATE/INSERT assignment targets columns that cannot be handled by the mutation strategy.","commonSituations":"Bulk HQL update/insert statements assigning columns spread across multiple tables or columns of joined associations.","solutions":["The INSERT assignment targets a column of a joined association, which the temp-table insert handler does not support.","Insert into the joined table separately or restructure the mapping."],"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"}