You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "George Hongell (JIRA)" <ji...@apache.org> on 2006/09/20 18:56:23 UTC

[jira] Updated: (OPENJPA-56) in derby concat with input parameter needs a cast, otherwise becomes long varchar and some operations do not work

     [ http://issues.apache.org/jira/browse/OPENJPA-56?page=all ]

George Hongell updated OPENJPA-56:
----------------------------------

    Attachment: failureEntities.jar

entity java files and derby ddl script to use to recreate this issue

> in derby concat with input parameter needs a cast, otherwise becomes long varchar and some operations do not work
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-56
>                 URL: http://issues.apache.org/jira/browse/OPENJPA-56
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: query
>         Environment: Windows xp, derby, openjpa  version 443432.
>            Reporter: George Hongell
>         Attachments: failureEntities.jar
>
>
> run on version 443432.
> in derby concat with input parameter needs a cast, otherwise becomes long varchar and some operations do not work
> (NOTE:already done if concat is inside substring eg. substring(concat(xxx,yyy),n,m)
> EJBQL:
> select d from EmpBean e left join e.dept d where concat(d.name, 'ahmad') = 'AhmadDept' 
>  
> OPENJPA ERROR OR SQL PUSHDOWN:
> Comparisons between 'LONG VARCHAR' and 'LONG VARCHAR' are not supported. {SELECT t1.deptno, t1.budget, t1.mgr_empid, t1.name, t1.reportsTo_deptno FROM EmpBean t0 LEFT OUTER JOIN DeptBean t1 ON t0.dept_deptno = t1.deptno WHERE ((t1.name||?) = ?)} [code=30000, state=42818] 
> SUGGESTED SQL PUSHDOWN:
> select t1.deptno, t1.name FROM EmpBean t0 LEFT OUTER JOIN DeptBean t1 ON t0.dept_deptno = t1.deptno WHERE (cast((t1.name||?) as Varchar(1000))) = ?  {String ahmad, String AhmadDept}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira