0 Replies Latest reply on Jul 30, 2013 3:21 AM by Orni Torrinc

    How to get the start revision timestamp on the audit table?

    Orni Torrinc Newbie



      I'm studying the documentation and I see that if you use ValidityAuditStrategy, Envers stores both the start revision and the end revision.


      And in the audit table partitioning example, on the Table 15.3. Salaries - audit table you can see the start revision timestamp column on that table.



      But I don't see in any part of the doc, how to get this column filled by Envers.


      So, please, how I can have a start revision timestamp column managed by Envers on the audit tables?


      Using version 4.0.1.Final and that's my persistence.xml Envers configuration:


      <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" />


      Thanks a lot.