[hibernate-issues] [Hibernate-JIRA] Updated: (HHH-6655) trim function on DB2 is broken
Steve Ebersole (JIRA)
noreply at atlassian.com
Wed Sep 14 13:15:02 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Ebersole updated HHH-6655:
--------------------------------
Fix Version/s: 4.0.0.CR3
> trim function on DB2 is broken
> ------------------------------
>
> Key: HHH-6655
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6655
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 4.0.0.CR2
> Reporter: Strong Liu
> Assignee: Steve Ebersole
> Fix For: 4.0.0.CR3
>
>
> For DB2 a warning message is generated by TempateRenderer which is not seen for other databases:
> WARN: HHH00174:Function template anticipated 3 arguments, but 2 arguments encountered
> see test _org.hibernate.ejb.criteria.CriteriaCompilingTest#testTrim_ for more details
> Also the query created is different in case of DB2:
> Hibernate: select replace(replace(ltrim(rtrim(replace(replace(customer0_.NAME,' ','${space}$'),?,' '))),' ',?),'${space}$',' ') as col_0_0_ from CUSTOMER_TABLE customer0_ where customer0_.NAME=? fetch first 2 rows only
> and finally it fails because of above warning:
> javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: DB2 SQL Error: SQLCODE=-313, SQLSTATE=07001
> For other DBs same code generates following query and test passes:
> Hibernate: select trim(BOTH ? from customer0_.NAME) as col_0_0_ from CUSTOMER_TABLE customer0_ where customer0_.NAME=? limit ?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list