HHH-11730-configurable-originalId-property

This commit is contained in:
dkublik 2017-05-08 12:10:09 +02:00 committed by Chris Cranford
parent eb819faa8c
commit 9fdd7e4588
2 changed files with 8 additions and 1 deletions

View File

@ -87,6 +87,11 @@ public interface EnversSettings {
*/
String REVISION_TYPE_FIELD_NAME = "org.hibernate.envers.revision_type_field_name";
/**
* Original id property name name. Defaults to {@literal originalId}.
*/
String ORIGINAL_ID_PROP_NAME = "org.hibernate.envers.original_id_prop_name";
/**
* Column name that will hold the end revision number in audit entities. Defaults to {@literal REVEND}.
*/

View File

@ -62,7 +62,9 @@ public class AuditEntitiesConfiguration {
EnversSettings.AUDIT_STRATEGY, properties, DefaultAuditStrategy.class.getName()
);
originalIdPropName = "originalId";
originalIdPropName = ConfigurationHelper.getString(
EnversSettings.ORIGINAL_ID_PROP_NAME, properties, "originalId"
);
revisionFieldName = ConfigurationHelper.getString( EnversSettings.REVISION_FIELD_NAME, properties, "REV" );