title: difficulties getting a simple envers example to work: problem #34
body: <p>I'm trying to get a simple <a href="http://www.jboss.org/envers/" rel="nofollow noreferrer">envers</a> example to work. I have the Java code working (apparently), and I finally <a href="https://stackoverflow.com/questions/952908">got the org.hibernate.tool.ant.EnversHibernateToolTask to work</a>, but it only outputs SQL for the "regular" data, not the versioning data. I'm stumped for what to do next.</p>
  
  <p>What might I be forgetting to include?</p>
  
  <p>Here is the SQL it outputs: {versioning-ddl.sql}</p>
  
  <pre><code>create table Event (
      id bigint generated by default as identity (start with 1),
      date timestamp,
      title varchar(255),
      primary key (id)
  );
  
  create table Person (
      id bigint generated by default as identity (start with 1),
      age integer not null,
      firstname varchar(255),
      lastname varchar(255),
      primary key (id)
  );
  
  create table PersonEvent (
      eventID bigint not null,
      personID bigint not null,
      primary key (eventID, personID)
  );
  
  alter table PersonEvent
      add constraint FK489E5C25F6E47374
      foreign key (personID)
      references Event;
  
  alter table PersonEvent
      add constraint FK489E5C25729F3820
      foreign key (eventID)
      references Person;
  </code></pre>
  
  <p>I don't see any history tables/fields. Here are the relevant entries in my hibernate.cfg.xml file:</p>
  
  <pre><code>&lt;hibernate-configuration&gt;
     &lt;session-factory&gt;
          ...
       &lt;property name="hibernate.ejb.event.post-insert"&gt;org.hibernate.envers.event.AuditEventListener&lt;/property&gt;
       &lt;property name="hibernate.ejb.event.post-update"&gt;org.hibernate.envers.event.AuditEventListener&lt;/property&gt;
       &lt;property name="hibernate.ejb.event.post-delete"&gt;org.hibernate.envers.event.AuditEventListener&lt;/property&gt;
       &lt;property name="hibernate.ejb.event.pre-collection-update"&gt;org.hibernate.envers.event.AuditEventListener&lt;/property&gt;
       &lt;property name="hibernate.ejb.event.pre-collection-remove"&gt;org.hibernate.envers.event.AuditEventListener&lt;/property&gt;
       &lt;property name="hibernate.ejb.event.post-collection-recreate"&gt;org.hibernate.envers.event.AuditEventListener&lt;/property&gt;
       &lt;mapping class="com.example.test.hibernate.test1.Event"/&gt;
       &lt;mapping class="com.example.test.hibernate.test1.Person"/&gt;
     &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p>and relevant portions of Java classes:</p>
  
  <pre><code> @Entity
   @Audited
   public class Event {
      @Id
      @GeneratedValue
      private Long id;
      private String title;
      private Date date;
      ...
   }
  
  
   @Entity
   @Audited
   public class Person {  
     @Id
     @GeneratedValue
     private Long id;
  
     private int age;
     private String firstname;
     private String lastname;
     ...
   }
  </code></pre>