[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3510) HQL SQLFunction replacement not occuring when HQL text has no parenthesis

Stephen Hookings (JIRA) noreply at atlassian.com
Tue Sep 21 05:29:26 EDT 2010


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=38465#action_38465 ] 

Stephen Hookings commented on HHH-3510:
---------------------------------------

I see from ANSI SQL CURRENT_TIMESTAMP(prec) and CURRENT_TIMESTAMP ie without parenthesis exists. I am adding just the CURRENT_TIMESTAMP into a future ASE release so that this will work without need for Hibernate changes. Why? Just about every other vendor supplies this function.

> HQL SQLFunction replacement not occuring when HQL text has no parenthesis
> -------------------------------------------------------------------------
>
>                 Key: HHH-3510
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3510
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: query-hql
>    Affects Versions: 3.2.4.sp1
>         Environment: Branch_3_2_4_SP1_CP and Sybase 15
>            Reporter: Juraci Paixao Krohling
>            Assignee: Steve Ebersole
>
> Test Case: ComponentTest#testComponentQueries
> Hibernate query "from Employee e where e.person = ('steve', current_timestamp)" should have translated "current_timestamp" to "getdate()" [1]:
> 14:49:11,087 DEBUG SQL:424 - select employee0_.ID as ID1_, employee0_.HIRE_DATE as HIRE2_1_, employee0_.name as name1_, employee0_.dob as dob1_, employee0_.value1 as value5_1_, employee0_.value2 as value6_1_ from T_EMP employee0_ where employee0_.name='steve' and employee0_.dob=current_timestamp
> 14:49:11,535  WARN JDBCExceptionReporter:77 - SQL Error: 207, SQLState: ZZZZZ
> 14:49:11,536 ERROR JDBCExceptionReporter:78 - Invalid column name 'current_timestamp'.
> [1] SybaseDialect, line 58: registerFunction( "current_timestamp", new NoArgSQLFunction("getdate", Hibernate.TIMESTAMP) );

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