[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3377?page=c...
]
Király Attila commented on HHH-3377:
------------------------------------
The bug is still present in Hibernate as of 3.5.0.Beta-1 because it was not fixed in
HHH-3401 either (last revamp of the H2Dialect as I can see).
H2 in Version 1.2.120 (2009-09-26) contains the bug fix described in this issue (thats the
only difference between the Hibernate included one and the new one), its a simple change,
I think it would be worth including it in some of the next Hibernate relase.
this time its h2 : foncusion of DECIMAL and NUMERIC column types
-----------------------------------------------------------------
Key: HHH-3377
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3377
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.2.6
Environment: H2 1.0.72, Hibernate 3.2.6
Reporter: Jan Baumann
Analogous to HHH-2582 when trying to persist a BigDecimal object, hibernate throws a
org.hibernate.HibernateException stating
"Wrong column type in [...]. Found: decimal, expected: numeric"
I checked the H2Dialect.java file, and as had been described for the MySQLDialect.java
the following line was present :
registerColumnType(Types.NUMERIC, "numeric");
Since H2 doesn't have a numeric type I tried the solution found for HHH-2582 and
changed the line mentioned above to
registerColumnType( Types.NUMERIC, "decimal($p,$s)" );
This seems to do the trick.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira