{"record":{"id":"3f4a9815f029f60c","repo":"hibernate/hibernate-orm","slug":"timezonecolumn-can-not-be-used-in-conjunction-w","errorCode":null,"errorMessage":"'@TimeZoneColumn' can not be used in conjunction with '@TimeZoneStorage( {} )' for attribute '{}.{}'","messagePattern":"'@TimeZoneColumn' can not be used in conjunction with '@TimeZoneStorage\\( (.+?) \\)' for attribute '(.+?)\\.(.+?)'","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/model/internal/BasicValueBinder.java","lineNumber":1075,"sourceCode":"\t\tfinal var enumerated = attribute.getDirectAnnotationUsage( Enumerated.class );\n\t\tif ( enumerated != null ) {\n\t\t\tenumType = enumerated.value();\n\t\t}\n\n\t\t//noinspection deprecation\n\t\tfinal var temporal = attribute.getDirectAnnotationUsage( Temporal.class );\n\t\tif ( temporal != null ) {\n\t\t\ttemporalPrecision = temporal.value();\n\t\t}\n\n\t\tfinal var timeZoneStorage = attribute.getDirectAnnotationUsage( TimeZoneStorage.class );\n\t\tif ( timeZoneStorage != null ) {\n\t\t\ttimeZoneStorageType = timeZoneStorage.value();\n\t\t\tfinal var timeZoneColumnAnn = attribute.getDirectAnnotationUsage( TimeZoneColumn.class );\n\t\t\tif ( timeZoneColumnAnn != null ) {\n\t\t\t\tif ( timeZoneStorageType != TimeZoneStorageType.AUTO\n\t\t\t\t\t\t&& timeZoneStorageType != TimeZoneStorageType.COLUMN ) {\n\t\t\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\t\t\"'@TimeZoneColumn' can not be used in conjunction with '@TimeZoneStorage( \"\n\t\t\t\t\t\t\t+ timeZoneStorageType + \" )' for attribute '\"\n\t\t\t\t\t\t\t+ attribute.getDeclaringType().getName() + '.' + attribute.getName() + \"'\"\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tpartitionKey = attribute.hasDirectAnnotationUsage( PartitionKey.class );\n\t}\n\n\t@Override\n\tpublic Dialect getDialect() {\n\t\treturn getMetadataCollector().getDatabase().getDialect();\n\t}\n\n\tprivate void applyJpaConverter(MemberDetails attribute, ConverterDescriptor<?,?> attributeConverterDescriptor) {\n\t\tfinal boolean autoApply = attributeConverterDescriptor.getAutoApplyDescriptor().isAutoApplicable();","sourceCodeStart":1057,"sourceCodeEnd":1093,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/model/internal/BasicValueBinder.java#L1057-L1093","documentation":"Error \"'@TimeZoneColumn' can not be used in conjunction with '@TimeZoneStorage( {} )' for attribute '{}.{}'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Two mutually exclusive annotations are placed on the same property or class.","commonSituations":"Combining annotations Hibernate treats as alternatives (e.g. @DynamicInsert with @SQLInsert, @MapKey with @MapKeyColumn), often after copy-pasting mappings or upgrading versions.","solutions":["Remove either @TimeZoneColumn or @TimeZoneStorage from the attribute; they cannot be combined.","Keep @TimeZoneStorage and configure the storage strategy there if both behaviors were intended."],"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"}