Test Case: ComponentTest#testComponentQueries
Hibernate query "from Employee e where e.person = ('steve', current_timestamp)" should have translated "current_timestamp" to "getdate()" :
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'.
 SybaseDialect, line 58: registerFunction( "current_timestamp", new NoArgSQLFunction("getdate", Hibernate.TIMESTAMP) );
Branch_3_2_4_SP1_CP and Sybase 15
Grr... Unfortunately the fix I considered causes a ambiguity. I'll have to think through this some more.
I changed the following test to skip the query for SybaseASE15Dialect:
I also added a "FailureExpected" test that reproduces this issue:
I've committed these changes to trunk, Branch_3_3, Branch_3_2, and Branch_3_2_4_SP1_CP.
When this issue is fixed, the check for SybaseASE15Dialect should be removed from ComponentTest.testComponentQueries() and ComponentTest.testComponentQueryMethodNoParensFailureExpected() should be deleted.
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.
This bug report does not indicate that the reported issue affects version 5.x. Versions prior to 5.x are no longer maintained. It would be a great help to the Hibernate team and community for someone to verify that the reported issue still affects version 5.x. If so, please add the 5.x version that you verified with to the list of affected-versions and attach the (preferably SSCCE) test case you used to do the verification to the report; from there the issues will be looked at during our triage meetings.
For details, see http://in.relation.to/2015/10/27/great-jira-cleanup-2015/
As part of verifying that this issue affects 5.0, please just set the "Affects version". Leave the "verify-affects-5.0" label and leave the issue in "Awaiting Response" status; these are critical for us to be able to track these verifications and triage them. Thanks.