Richard Zowalla created OPENJPA-3039:
----------------------------------------

             Summary: Derby: JPQL comparison of two parameters fails
                 Key: OPENJPA-3039
                 URL: https://issues.apache.org/jira/browse/OPENJPA-3039
             Project: OpenJPA
          Issue Type: Sub-task
            Reporter: Richard Zowalla
            Assignee: Richard Zowalla


On Derby, a JPQL comparison where both operands are parameters fails:
{noformat}SELECT e FROM Entity e WHERE :a = :b
42X35: It is not allowed for both operands of '=' to be ? parameters.{noformat}
Derby has {{requiresCastForComparisons}}, but JPQL parameters have type Object, 
so no cast is written. The criteria API case ({{cb.equal(param, param)}} with 
typed parameters) is fixed in OPENJPA-3031; the JPQL case needs the cast type 
from the bound value.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to