As I read on the Hibernate Envers 4.2 siteChapter 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:
private int id;
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 ?
Retrieving data ...