Hi all,
I just proposed in JPA on the thread for support for Maps that JPAQL
support "#key" and "#value" for navigation through maps, much like we
can use "#key" and "#value" to define fetch groups in JDO. I took
for granted that these expressions can be used in JDOQL, and after a
search through the spec, I don't see where they can. I only see the
list of supported Map and Collection methods in 14.6.2, "Filter
specfication".
One of the JPA examples in the proposal looks like the following:
SELECT im#value
FROM Item i JOIN i.images im
WHERE im#key in ('thumbnail', 'full', 'high-res')
First, what would the equivalent JDOQL for this be?
Second, what are your thoughts on JDOQL support for "#key", "#value"
and "in"? This would allow us to write the following. This is
decidedly not very Java-like (a design goal of JDOQL), so this would
be a bit of a departure from tradition for JDOQL.
-matthew