[ 
https://issues.apache.org/jira/browse/OPENJPA-3039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18134689#comment-18134689
 ] 

ASF subversion and git services commented on OPENJPA-3039:
----------------------------------------------------------

Commit 9657b1ddf18599f3b7bf0aaf72ee84870aefff79 in openjpa's branch 
refs/heads/asciidoc from Richard Zowalla
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=9657b1ddf ]

[OPENJPA-3039] Cast parameters compared with each other to the type of their 
values (#240)

* [OPENJPA-3043] Record each occurrence of a parameter at its own position

* [OPENJPA-3039] Cast parameters compared with each other to the type of their 
values

* [OPENJPA-3039] Add braces and use try-with-resources in the test

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

Reply via email to