[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-3377) Update H2Dialect to use DECIMAL SQL type instead of NUMERIC
Steve Ebersole (JIRA)
noreply at atlassian.com
Fri Jul 16 15:24:13 EDT 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3377?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole closed HHH-3377.
-------------------------------
> Update H2Dialect to use DECIMAL SQL type instead of NUMERIC
> ------------------------------------------------------------
>
> 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
>
> Time Spent: 0.15h
> Remaining Estimate: 0h
>
> 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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list