From: Andrey G. (JIRA) <no...@at...> - 2006-05-17 09:55:13
|
day sql-function does not exist in MySQL before 4.1.1 ----------------------------------------------------- Key: HHH-1760 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1760 Project: Hibernate3 Type: Improvement Components: core Versions: 3.1.3 Environment: Hibernate 3.1.3, MySQL 4.0.20d Reporter: Andrey Grebnev Hello MySQLDialect.java has the following definition: registerFunction("day", new StandardSQLFunction("day", Hibernate.INTEGER) ); but we can read in MySQL documentation that DAY(date) DAY() is a synonym for DAYOFMONTH(). It is available as of MySQL 4.1.1. so before mysql 4.1.1 we does not have day function. I offer to replace above line in Dialect with the following registerFunction("day", new StandardSQLFunction("dayofmonth", Hibernate.INTEGER) ); In this way we will have compatibility with MySql versions both before 4.1.1 and after 4.1.1. Thanks. -- 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 |