Hi All,
Version: Hibernate 4.2.3
I have an entity that has an Integer object for its Id. I have a sequence generator that is assigning a value to the Id when saving the object to the database (Oracle 11g). The sequence has passed 2^31-1 which is the max value for an Integer in Java. I would expect an exception when assigning this value to my Id, but instead it seems to be saving the lower order 32 bits. Is there a way to catch this rather than having the integer overflow and continuing to persist the object? I did not expect a silent overflow to occur like this.
Thanks, Devin
|