{"record":{"id":"3fa3085d647e6c79","repo":"hibernate/hibernate-orm","slug":"property-must-be-a-basic-attribute","errorCode":null,"errorMessage":"{} property '{}.{}' must be a basic attribute","messagePattern":"(.+?) property '(.+?)\\.(.+?)' must be a basic attribute","errorType":"exception","errorClass":"MappingException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/model/internal/AuditHelper.java","lineNumber":573,"sourceCode":"\t * Validate that a named property exists and is mapped as a {@link BasicValue}.\n\t */\n\tprivate static Property requireBasicProperty(\n\t\t\tPersistentClass entityBinding,\n\t\t\tString propertyName,\n\t\t\tString annotationName) {\n\t\tfinal Property property;\n\t\ttry {\n\t\t\tproperty = entityBinding.getProperty( propertyName );\n\t\t}\n\t\tcatch (MappingException e) {\n\t\t\tthrow new MappingException(\n\t\t\t\t\tannotationName + \" member '\" + propertyName\n\t\t\t\t\t\t\t+ \"' is not mapped as a property on @Changelog '\"\n\t\t\t\t\t\t\t+ entityBinding.getEntityName() + \"'\"\n\t\t\t);\n\t\t}\n\t\tif ( !( property.getValue() instanceof BasicValue ) ) {\n\t\t\tthrow new MappingException(\n\t\t\t\t\tannotationName + \" property '\" + entityBinding.getEntityName()\n\t\t\t\t\t\t\t+ \".\" + propertyName + \"' must be a basic attribute\"\n\t\t\t);\n\t\t}\n\t\treturn property;\n\t}\n\n\t/**\n\t * Create an audit table for the given source table: copy columns,\n\t * add the REV column, create the composite PK, and add the\n\t * REV -> REVINFO FK (if a changelog entity is configured).\n\t */\n\tprivate static Table createAuditTable(\n\t\t\tTable sourceTable,\n\t\t\tString csIdColumnName,\n\t\t\tSet<String> excludedColumns,\n\t\t\t@Nullable String schemaOverride,\n\t\t\t@Nullable String catalogOverride,","sourceCodeStart":555,"sourceCodeEnd":591,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/model/internal/AuditHelper.java#L555-L591","documentation":"Error \"{} property '{}.{}' must be a basic attribute\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An Envers-style @Changelog member mapping is invalid (multiple annotated members, unmapped member, or non-basic attribute).","commonSituations":"Audited entities where the changelog class has more than one tracked member, references a property that is not mapped, or tracks a non-basic (association/embeddable) attribute.","solutions":["Change the property to a basic attribute type, or remove the annotation that requires a basic attribute.","If an association or embedded type is intended, use the mapping appropriate for that kind instead."],"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"}