persistence@glassfish.java.net

Do update/delete statements support Collection member declaration and path expressions

From: Farrukh Najmi <farrukh_at_wellfleetsoftware.com>
Date: Thu, 13 Sep 2007 15:39:35 -0400

Dear colleagues,

Does EJBQL support the simplified syntax for matching objects to update
or delete based on the value of an attribute in an element of a
collection attribute?

I do not see any evidence of it in the spec which is surprising.

As an example the following SELECT query does not seem to have an
equivalent simplified syntax for UPDATE or DELETE:

SELECT DISTINCT OBJECT(p)
FROM Player p, *IN (p.teams) AS t
*WHERE *t.city* = ?1

If as I suspect, it is not supported, then can someone please provide a rationale as to why not?
Perhaps I am missing something obvious.


-- 
Regards,
Farrukh
Web: http://www.wellfleetsoftware.com