Hi,
I have a table with a column defined as NUMBER(12) and with a value 999999999999 (12 digits), and I'm mapping this column as an Integer.
When I'm making a simple find (even if I'm retrieving only one row) I'm having this exception:
18:29:20,035 ERROR [SProductDimensionBean:426] net.sf.hibernate.exception.GenericJDBCException: Could not execute query
net.sf.hibernate.exception.GenericJDBCException: Could not execute query
at net.sf.hibernate.exception.ErrorCodeConverter.handledNonSpecificException(ErrorCodeConverter.java:90)
at net.sf.hibernate.exception.ErrorCodeConverter.convert(ErrorCodeConverter.java:79)
at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at net.sf.hibernate.impl.SessionImpl.convert(SessionImpl.java:4131)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1557)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1531)
at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1523)
....
My questions are:
1. Is there a maximum length for mapping a column into an Integer value?
2. Is this maximum less than 12?
3. What must I use? Long or BigInteger?
The max number I can load using Hibernate is a number with 9 digits.
Thanks in advance,
Sérgio
|