-
1. Re: How to map a java double type in hibernate to oracle NUM
rabbiaqaswar Apr 3, 2007 9:03 AM (in response to yangju)have you tried using Long in your code to map it to a Oracle Number data type?
-
2. Re: How to map a java double type in hibernate to oracle NUM
yangju Apr 3, 2007 10:11 AM (in response to yangju)We need either BigDecimal or double (not integer). Long does not make sense to us.
-
3. Re: How to map a java double type in hibernate to oracle NUM
rabbiaqaswar Apr 4, 2007 7:51 AM (in response to yangju)you can also map oracle Number to BigDecimal. i have some Number with precision points and am mapping them to BigDecimal in my POJOs. they work fine.
-
4. Re: How to map a java double type in hibernate to oracle NUM
yangju Apr 4, 2007 10:31 AM (in response to yangju)The problem I am facing is hibernate validator. If I turn off validator, there is no problem for the mapping at run time.
I tried big_decimal. It could not pass the hibernate validator. Looks like the jdbc driver returns decimal type but the hibernate expected numeric. They are really the same thing but becuase of the type code mismatch, hibernate failed it (in the Table class). -
5. Re: How to map a java double type in hibernate to oracle NUM
rabbiaqaswar Apr 5, 2007 2:18 AM (in response to yangju)have you tried BigInteger? i just checked the hibernate reference documentation version: 3.2 cr1 and it mentions:
"big_decimal, big_integer: Type mappings from java.math.BigDecimal and java.math.BigInteger to NUMERIC (or Oracle NUMBER)." -
6. Re: How to map a java double type in hibernate to oracle NUM
deanouk Nov 8, 2007 6:53 AM (in response to yangju)Any solution to this? I see plenty of hibernate JIRA issues etc, but no solution.
Turning off schema validation will work, but we'd much prefer it on.