[hibernate-issues] [Hibernate-JIRA] Closed: (HHH-2822) timestamp extraction functions for SAPDBDialect

Steve Ebersole (JIRA) noreply at atlassian.com
Wed Oct 3 02:18:24 EDT 2007


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Ebersole closed HHH-2822.
-------------------------------

    Resolution: Fixed

3.2/trunk

> timestamp extraction functions for SAPDBDialect
> -----------------------------------------------
>
>                 Key: HHH-2822
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2822
>             Project: Hibernate3
>          Issue Type: Improvement
>          Components: query-hql
>         Environment: SAPDB 7.6
>            Reporter: Yossi Tamari
>            Assignee: Steve Ebersole
>            Priority: Minor
>             Fix For: 3.2.6, 3.3
>
>   Original Estimate: 1 hour
>  Remaining Estimate: 1 hour
>
> There is no registerFunction in the SAPDBDialect for the date extraction SQL functions (extract, day, hour...). Therefore, the inherited registration from Dialect are in effect. However, they all map to extract, which is no supported in SAPDB.
> The correct implementation is to register the following functions in SAPDBDialect.java:
> registerFunction( "second", new SQLFunctionTemplate(Hibernate.INTEGER, "second(?1)") );
> registerFunction( "minute", new SQLFunctionTemplate(Hibernate.INTEGER, "minute(?1)") );
> registerFunction( "hour", new SQLFunctionTemplate(Hibernate.INTEGER, "hour(?1)") );
> registerFunction( "day", new SQLFunctionTemplate(Hibernate.INTEGER, "day(?1)") );
> registerFunction( "month", new SQLFunctionTemplate(Hibernate.INTEGER, "month(?1)") );
> registerFunction( "year", new SQLFunctionTemplate(Hibernate.INTEGER, "year(?1)") );
> registerFunction( "extract", new SQLFunctionTemplate(Hibernate.INTEGER, "?1(?3)") );

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