int type in Revision number

Description

At class DefaultRevisionEntity we have:

@RevisionNumber
private int id;

I made a test setting the HIBERNATE_SEQUENCE to 2,147,483,647. After that, I made an audited update.

The REV column of REVINFO table become negative (int type overflow)

The revision number should be long, at least.

No warnings / exceptions at all could be dangerous. In a overflow all the audit will stop working (envers based the version recoverry in an always increasing REV value, right?). In a very worst scenario, after a long time loosing audit, a primary key violation will happen.

Environment

Hibernata 3.6.6, Oracle

Assignee

Chris Cranford

Reporter

Adriano Saturno Muniz

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure