Dear adamw
As I read on the Hibernate Envers 4.2 site
Chapter 15. Envers
for a revision log, in order to implement a custom @RevisionEntity, there are 2 solutions:
I tried solution 1 but it failed - there's a JPA validation failed in my JBoss Dev Studio: The entity has no primary key attribute defined
When I looked in the source code of DefaultRevisionEntity I saw that the attributes are private, not protected:
@Id
@GeneratedValue
@RevisionNumber
private int id;
@RevisionTimestamp
private long timestamp;
So this is the source of the error.
Why don't you make the above attributes protected ? Or set the above annotations on property level ?