Hello,
we are developing an application with hibernate 4.2.21 and jboss 6.3.
We annotate entities with @Audited and when create a record, one record is inserted in _history table but REV_END_TIMESTAMP value is not in UTC mode.
Code:
ID_COMPANY NAME REVISION REV_TYPE REV_END REV_TIMESATAMP
xxxxx Company 1.. 2279 0 2016-05-11 17:00:59 (NON UTC)
in updates, REV_END_TIMESTAMP changes to utc value but las update persists in non utc value.
Code:
ID_COMPANY NAME REVISION REV_TYPE REV_END REV_TIMESATAMP
xxxxx Company 1 2279 0 2280 2016-05-11 15:00:12 (UTC)
xxxxx Company 1. 2280 1 2281 2016-05-11 15:00:59 (UTC)
xxxxx Company 1.. 2281 1 2016-05-11 17:00:59 (NON UTC)
Envers properties
Code:
<property name="org.hibernate.envers.audit_table_suffix" value="_HISTORY"/>
<property name="org.hibernate.envers.revision_field_name" value="REVISION"/>
<property name="org.hibernate.envers.revision_type_field_name" value="REV_TYPE"/>
<property name="org.hibernate.envers.audit_strategy" value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>
<property name="org.hibernate.envers.audit_strategy_validity_store_revend_timestamp" value="true"/>
<property name="org.hibernate.envers.audit_strategy_validity_end_rev_field_name" value="REV_END"/>
<property name="org.hibernate.envers.audit_strategy_validity_revend_timestamp_field_name" value="REV_END_TIMESTAMP"/>
<property name="org.hibernate.envers.track_entities_changed_in_revision" value="true"/>
Is there a way to have all rev_end_timestamp in utc mode?
Kind regards.
Marcel.