[hibernate-issues] [Hibernate-JIRA] Created: (HHH-2016) Oracle9Dialect registers last_day() function as "lastday"

Carl Lindberg (JIRA) noreply at atlassian.com
Sat Aug 19 15:23:18 EDT 2006


Oracle9Dialect registers last_day() function as "lastday"
---------------------------------------------------------

         Key: HHH-2016
         URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2016
     Project: Hibernate3
        Type: Bug

  Components: core  
    Versions: 3.0 alpha, 3.0 beta 1, 3.0 beta 2, 3.0 beta 3, 3.0 beta 4, 3.0 rc 1, 3.0 final, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1 beta 1, 3.1 beta 2, 3.1 rc 1, 3.1 rc2, 3.1 rc3, 3.1, 3.1.1, 3.1.2, 3.2.0.alpha1, 3.2.0.alpha2, 3.1.3, 3.2.0 cr1, 3.2.0.cr2, 3.2.0.cr3    
 Environment: Hibernate 2.x, 3.x with an Oracle database
    Reporter: Carl Lindberg
    Priority: Minor
 Attachments: Oracle9DialectPatch.diff, Oracle9DialectPatchOption2.diff

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