]
Steve Ebersole updated HHH-3377:
--------------------------------
Fix Version/s: 3.5.2
3.6
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
Assignee: Steve Ebersole
Fix For: 3.5.2, 3.6
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: