InformixDialect uses wrong date methods mapping
-----------------------------------------------
Key: HHH-2424
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2424
Project: Hibernate3
Type: Bug
Components: query-hql
Versions: 3.2.2
Environment: Informix
Reporter: Giltal Tzabar
Attachments: Informix10Dialect.java
The InformixDialect extends the Dialect class but does not replace the
date methods mappings.
To correct this bug you need to write the following lines in the dialect default
constructor:
// Map second/minute/hour/day/month/year, override on subclasses
registerFunction("second", new SQLFunctionTemplate(Hibernate.INTEGER,
"second(?1)"));
registerFunction("minute", new SQLFunctionTemplate(Hibernate.INTEGER,
"minute(?1)"));
registerFunction("hour", new SQLFunctionTemplate(Hibernate.INTEGER,
"hour(?1)"));
registerFunction("day", new SQLFunctionTemplate(Hibernate.INTEGER,
"day(?1)"));
registerFunction("month", new SQLFunctionTemplate(Hibernate.INTEGER,
"month(?1)"));
registerFunction("year", new SQLFunctionTemplate(Hibernate.INTEGER,
"year(?1)"));
--
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