[hibernate-issues] [Hibernate-JIRA] Created: (HHH-3424) concat() with param binding fails function on derby

Steve Ebersole (JIRA) noreply at atlassian.com
Fri Aug 8 12:08:30 EDT 2008


concat() with param binding fails function on derby 
----------------------------------------------------

                 Key: HHH-3424
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3424
             Project: Hibernate3
          Issue Type: Improvement
          Components: query-criteria, query-hql, query-sql
         Environment: Derby (although assumed DB2 has same issue)
            Reporter: Steve Ebersole
            Assignee: Steve Ebersole
             Fix For: 3.3.x


Derby does not accept queries in which concat is used to attempt to concatenate params.  For example:

concat( ?, ? ) is illegal because it limits that only strings can be concatenated.  As such, one must use cast() calls around the params:

concat( cast( ? as varchar(xyz) ), cast ( ? as varchar(xyz) ) )

Note however, that this limits what can be bound to these params a bit when those queries run against derby/db2...



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