I'm using envers (3.4.0-SNAPSHOT) and hibernate (3.3.1.GA). I have this model referenced in my hibernate.cfg.xml - on save - I'm getting the following:
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'global.revinfo' doesn't exist
@Entity @Table(name = "revision_info") @RevisionEntity(CustomRevisionListener.class) public class CustomRevisionEntity { private int id; private long timestamp; private String username = "storedatmodel"; @Id @RevisionNumber @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "revision_id", nullable = false, insertable = false, updatable = false) public int getId() { return id; } public void setId(int id) { this.id = id; } @RevisionTimestamp @Column(name = "revision_timestamp") public long getTimestamp() { return timestamp; } public void setTimestamp(long timestamp) { this.timestamp = timestamp; } @Column(name = "username") public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } }
issue resolved - was using hibernate.Entity annotation not the javax.persistence.Entity annotation.