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

Ben Turner (JIRA) noreply at atlassian.com
Mon Nov 5 11:17:29 EST 2007


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28706 ] 

Ben Turner commented on HHH-2016:
---------------------------------

Can still produce in 3.2.3 - patch looks simple, would be good to see this assigned and fixed ?

> 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.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
>
>   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