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
Error execution delete operation without identification_variable #1727
Comments
Added simple jUnit into development branch:
And this test passed:
So looks like future 4.0 is OK. |
Signed-off-by: Tomáš Kraus <tomas.kraus@oracle.com>
Yes, you are right, JUnit-test works correctly. My initial description was incorrect
Case 1 fully corresponds to specification, but cases 2-3 - not. For this reason is strange, that in case 2 we have an error, but in case 3 we have correct result. |
Signed-off-by: Tomáš Kraus <tomas.kraus@oracle.com>
OK, I was able to reproduce this. Modified PR #1729 to contain fix and tests for both FQN cases. We need them covered for the future. |
Signed-off-by: Tomáš Kraus <tomas.kraus@oracle.com>
Are we sure the JPA Specification intended to allow for: Query query = em.createQuery("DELETE FROM Employee WHERE firstName = :fName AND lastName = :lName");
query.setParameter("fName", "Peter");
query.setParameter("lName", "Parker");
query.executeUpdate(); The examples provided in the specification don't specifically include one where no identification variable is supplied and this query syntax looks more like a I wonder if the JPA Specification is incorrect, or rather not verbose enough to describe the real intention; something like:
IOW: if you don' supply a I don't know. What is the usecase of supporting two different syntax in JPQL that do the same thing and are negligibly different? Why support both: em.createQuery("DELETE FROM Employee WHERE firstName = :fName AND lastName = :lName"); and em.createQuery("DELETE FROM Employee e WHERE e.firstName = :fName AND e.lastName = :lName"); |
Signed-off-by: Tomáš Kraus <tomas.kraus@oracle.com>
By executing
DELETE FROM entity_name
Eclipselink 3.0.3 gives a NullPointerException error. But executionDELETE FROM entity_name x
works correctly.Identification variable is required, but specification defines it as optional.
See demonstration project for details.
Environment:
The text was updated successfully, but these errors were encountered: