-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assignment to computed value misinterpreted in JDQL UPDATE when entity identification variable is ommitted #2183
Comments
We were able to recreate this issue using a simple JPA application. Below is the Coordinate entity we created by referencing the entity present in Jakarta Data.
Here is the code where we executed the JPQL query:
This resulted in the following exception stack, which is the same as described in the issue:
|
FYI , I'm currently looking into this issue. |
I believe this case is already fixed in the master branch with #2218. |
The issue is already fixed. This is only a test that verifies the fix.
The issue is already fixed. This is only a test that verifies the fix.
Yes. I fixed some issues with implicit alias too, because I hit them with a test query that I used to reproduce the main issue with “lenght”. |
* Fixes #2197, #2198, #2199 related to using "this" variable in JPQL When the "this" variable is used explicitly, it's virtual but needs to be skipped in expressions that expect a virtual variable. The problem was that expressions like 'this.field' were treated as if 'this' was a field on the implicit variable. * Adds a test for #2183 The issue is already fixed. This is only a test that verifies the fix.
Describe the bug
When the optional entity identification variable is omitted (for consistency with JDQL) of a JPQL query such as the following,
UPDATE Coordinate SET x = :newX, y = y / :yDivisor WHERE id = :id
EcilpseLink complains that "The left expression is not an arithmetic expression" instead of interpreting the assignment operation correctly.
The text was updated successfully, but these errors were encountered: