Re: JPQL delete with subquery

2011-03-25 Thread Pinaki Poddar
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.

Re: JPQL delete with subquery

2011-03-25 Thread Pinaki Poddar
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.

JPQL delete with subquery

2011-03-24 Thread LongkerDandy
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: