[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1811?page=c...
]
Andreas Bergander commented on HHH-1811:
----------------------------------------
The same thing applies to the types double and float. These should be replaced by decimal
which is avaible as of MySQL 5.0.8. The following patch to MySQL5Dialect.java seems to
work fine:
@Override
public String getCastTypeName(int code) {
if ( code==Types.DOUBLE || code==Types.FLOAT ) {
return "decimal";
}
else {
return super.getCastTypeName( code );
}
}
Parameters of type Long should be casted as SIGNED in MySQL when
using cast()
-----------------------------------------------------------------------------
Key: HHH-1811
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1811
Project: Hibernate3
Issue Type: Bug
Components: query-hql
Environment: MySQL4.1, Hibernate 3.1.3
Reporter: Ricardo Illgen
Priority: Minor
When using the function cast() in mysql, hibernate doesnt handle properly the properties
of type Long. I made a workaround in my application extending the MySQLDialect class, and
overwriting the getCastTypeName(int code) method, so it returns "signed" for
BIGINT sql types too. Currently its falling back to the ancestor class method and
returning "long" which causes an syntax error in MySQL.
--
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