[
https://issues.apache.org/jira/browse/OPENJPA-3039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18133735#comment-18133735
]
ASF subversion and git services commented on OPENJPA-3039:
----------------------------------------------------------
Commit 968e07f78957e44acb08a6ee63a6773705adc0a0 in openjpa's branch
refs/heads/OPENJPA-3039 from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=968e07f78 ]
[OPENJPA-3039] Cast parameters compared with each other to the type of their
values
> 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
>
> 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)