[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-2016) Oracle9Dialect registers last_day() function as "lastday"
Diego Pires Plentz (JIRA)
noreply at atlassian.com
Mon Nov 5 21:10:29 EST 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2016?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
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:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions072.htm
http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/functions58a.htm
Fixed in trunk/3.2.6
> 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: 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