]
Diego Pires Plentz resolved HHH-2016.
-------------------------------------
Resolution: Fixed
I changed it in Oracle9Dialect and Oracle8iDialect. I just change the lines, because it
won't work anyway if anybody used as it was.
References:
Oracle9Dialect registers last_day() function as "lastday"
---------------------------------------------------------
Key: HHH-2016
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2016
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.5
Environment: Hibernate 2.x, 3.x with an Oracle database
Reporter: Carl Lindberg
Assignee: Diego Pires Plentz
Priority: Minor
Fix For: 3.2.6
Attachments: Oracle9DialectPatch.diff, Oracle9DialectPatchOption2.diff
Original Estimate: 30 minutes
Remaining Estimate: 30 minutes
Oracle9Dialect.java registers a "lastday" function, however the actual Oracle
function is last_day() (with the underscore). This results in a SQL error if the function
is used in HQL (and obviously, HQL will not accept use of "last_day").
The patch is basically:
- registerFunction( "lastday", new StandardSQLFunction("lastday",
Hibernate.DATE) );
+ registerFunction( "last_day", new StandardSQLFunction("last_day",
Hibernate.DATE) );
or, if support for the incorrect "lastday" usage should still be supported:
- registerFunction( "lastday", new StandardSQLFunction("lastday",
Hibernate.DATE) );
+ registerFunction( "last_day", new StandardSQLFunction("last_day",
Hibernate.DATE) );
+ registerFunction( "lastday", new StandardSQLFunction("last_day",
Hibernate.DATE) );
Both patch options are attached.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: