Hello
I'm trying to use envers to be able to use the version,audit tables
I'm using
- envers-1.2.1
- hibernate-tools-3.2.0.ga
- hibernate-core-3.3.10.ga
My "hibernate-context.xml" is
Code:
<prop key="hibernate.cache.provider_class">${hibernate.provider_class}</prop>
<prop key="hibernate.ejb.event.post-insert">org.hibernate.ejb.event.EJB3PostInsertEventListener,org.hibernate.envers.event.AuditEventListener</prop>
<prop key="hibernate.ejb.event.post-update">org.hibernate.ejb.event.EJB3PostUpdateEventListener,org.hibernate.envers.event.AuditEventListener" </prop>
<prop key="hibernate.ejb.event.post-delete">org.hibernate.ejb.event.EJB3PostDeleteEventListener,org.hibernate.envers.event.AuditEventListener</prop>
<prop key="hibernate.ejb.event.pre-collection-update">org.hibernate.envers.event.AuditEventListener</prop>
<prop key="hibernate.ejb.event.pre-collection-remove">org.hibernate.envers.event.AuditEventListener</prop>
<prop key="hibernate.ejb.event.post-collection-recreate">org.hibernate.envers.event.AuditEventListener</prop>
I'm using ant with maven to create my table
My build.xml is
Code:
<target name="generateDDL">
<mkdir dir="${basedir}/target/generated-sources/schema" />
<taskdef classpathref="toolslib" name="hibernatetool" classname="org.hibernate.tool.ant.EnversHibernateToolTask"/>
<hibernatetool destdir="${basedir}/target/generated-sources">
<classpath refid="maven.test.classpath" />
<annotationconfiguration configurationfile="${basedir}/src/main/resources/common/hibernate.cfg.xml"/>
<hbm2ddl drop="false" create="true" export="${export}"
outputfilename="./schema/schema.ddl" delimiter=";" format="true" />
</hibernatetool>
</target>
I succeded to create the usual table but not the "_AUD" tables, no errors are thrown
Anybody suceed to make envers works with hibernate using hibernate-context.xml and not with "JPA and persistence.xml" ?
Thanks for your replies