{"record":{"id":"488ce5ee6b099767","repo":"hibernate/hibernate-orm","slug":"specifying-softdelete-converter-in-conjunction-wit","errorCode":null,"errorMessage":"Specifying SoftDelete#converter in conjunction with SoftDeleteType.TIMESTAMP is not supported","messagePattern":"Specifying SoftDelete#converter in conjunction with SoftDeleteType\\.TIMESTAMP is not supported","errorType":"exception","errorClass":"UnsupportedMappingException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/model/internal/SoftDeleteHelper.java","lineNumber":65,"sourceCode":"\t\tfinal var softDeleteIndicatorColumn = createSoftDeleteIndicatorColumn(\n\t\t\t\tsoftDeleteConfig,\n\t\t\t\tcreateSoftDeleteIndicatorValue( softDeleteConfig, table, context ),\n\t\t\t\tcontext\n\t\t);\n\t\ttable.addColumn( softDeleteIndicatorColumn );\n\t\ttarget.enableSoftDelete( softDeleteIndicatorColumn, softDeleteConfig.strategy() );\n\t}\n\n\tprivate static BasicValue createSoftDeleteIndicatorValue(\n\t\t\tSoftDelete softDeleteConfig,\n\t\t\tTable table,\n\t\t\tMetadataBuildingContext context) {\n\t\tfinal var softDeleteIndicatorValue = new BasicValue( context, table );\n\t\tsoftDeleteIndicatorValue.makeSoftDelete( softDeleteConfig.strategy() );\n\n\t\tif ( softDeleteConfig.strategy() == SoftDeleteType.TIMESTAMP ) {\n\t\t\tif ( softDeleteConfig.converter() != SoftDelete.UnspecifiedConversion.class ) {\n\t\t\t\tthrow new UnsupportedMappingException(\n\t\t\t\t\t\t\"Specifying SoftDelete#converter in conjunction with SoftDeleteType.TIMESTAMP is not supported\"\n\t\t\t\t);\n\t\t\t}\n\t\t\tsoftDeleteIndicatorValue.setImplicitJavaTypeAccess( (typeConfiguration) -> Instant.class );\n\t\t}\n\t\telse {\n\t\t\tfinal ConverterDescriptor<Boolean,?> converterDescriptor =\n\t\t\t\t\tConverterDescriptors.of( softDeleteConfig.converter() );\n\t\t\tsoftDeleteIndicatorValue.setJpaAttributeConverterDescriptor( converterDescriptor );\n\t\t\tsoftDeleteIndicatorValue.setImplicitJavaTypeAccess(\n\t\t\t\t\ttypeConfiguration -> converterDescriptor.getRelationalValueResolvedType()\n\t\t\t);\n\t\t}\n\n\t\treturn softDeleteIndicatorValue;\n\t}\n\n\tprivate static Column createSoftDeleteIndicatorColumn(","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/model/internal/SoftDeleteHelper.java#L47-L83","documentation":"Error \"Specifying SoftDelete#converter in conjunction with SoftDeleteType.TIMESTAMP is not supported\" 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 SoftDelete#converter when using SoftDeleteType.TIMESTAMP, or use a different soft-delete strategy with a converter."],"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"}