How about
SELECT m from Movie m where m.files IS NULL?
-
Pinaki
--
View this message in context:
http://openjpa.208410.n2.nabble.com/JPQL-delete-with-subquery-tp6205105p6208334.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Oops:
DELETE m from Movie m where m.files IS NULL?
-
Pinaki
--
View this message in context:
http://openjpa.208410.n2.nabble.com/JPQL-delete-with-subquery-tp6205105p6208343.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.
Hi
I can't figure out this.
I want to delete all the MOVIE entities which doesn't contain any files.
entityManager.createQuery(DELETE FROM MOVIE m WHERE m IN (SELECT em FROM
MOVIE em LEFT JOIN em.files f WHERE em.files IS NULL)).executeUpdate();
And I got the exception: