[
https://issues.apache.org/jira/browse/OPENJPA-3039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Zowalla updated OPENJPA-3039:
-------------------------------------
Fix Version/s: 4.2.0
> 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
> Priority: Major
> Fix For: 4.2.0
>
>
> 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)