Permalink
Browse files

Adding Envers

  • Loading branch information...
1 parent 835891b commit ccad766bc834b6211d57391bed04f76904a64456 @adamw committed Sep 28, 2011
Showing with 12 additions and 0 deletions.
  1. +6 −0 pom.xml
  2. +5 −0 src/main/java/pl/softwaremill/demo/domain/Person.java
  3. +1 −0 src/main/resources/META-INF/MANIFEST.MF
View
@@ -19,6 +19,12 @@
<artifactId>metawidget-forge-scaffold</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-envers</artifactId>
+ <version>4.0.0.CR3</version>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<repositories>
<repository>
@@ -1,4 +1,7 @@
package pl.softwaremill.demo.domain;
+import org.hibernate.envers.Audited;
+import org.hibernate.envers.NotAudited;
+
import javax.persistence.Entity;
import java.io.Serializable;
import javax.persistence.Id;
@@ -8,6 +11,7 @@
import javax.persistence.Version;
@Entity
+@Audited
public class Person implements java.io.Serializable {
private static final long serialVersionUID=1L;
@@ -18,6 +22,7 @@
@Version
@Column(name="version")
+ @NotAudited
private int version=0;
@Column
@@ -0,0 +1 @@
+Dependencies: org.hibernate.envers services
@stliu

stliu Sep 30, 2011

is this line required?

@adamw

adamw Sep 30, 2011

Owner

Indeed, it's not! Thanks a lot for noting this :) I'll update the blog post.

Adam

0 comments on commit ccad766

Please sign in to comment.