To follow-up on my prior comment, Envers already supports Long data types for revision numbers. It is just that the default class implementations in Envers default to using Integer. If you'd like to use Long data types, you would need to create your own revision entity implementation and supply that to Envers, as follows:
@Entity
@RevisionEntity
public class YourCustomRevisionEntity implements Serializable {
@Id
@GeneratedValue
@RevisionNumber
private long id
@RevisionTimestamp
private long timestamp;
/* supply getters/setters/hashCode/equals */
}
As to providing native support for Long in the revision entity implementations, this will need to be managed by a configuration setting. |