> The query I'd like to perform is something like:
>
> SELECT p.*, t.* FROM Person p
> LEFT JOIN PersonTemplate pt ON p.id = pt.personId
> LEFT JOIN Template t ON pt.templateId = t.id
>
> With this query, I can get Persons even if they don't have a Template.
Which is what you would do if you followed the example I suggested, using JDOQL 
variables.

SELECT p, t FROM mydomain.Person WHERE pt.person == this && pt.t == t
VARIABLES mydomain.PersonTemplate pt, mydomain.Template t


> AFAIK you cannot return two types in a single query with JDOQL

You can set a result clause in JDOQL can't you? 
So it's safe to conclude you can return multiple objects as well.



Regards
-- 
Andy
DataNucleus (Web: http://www.datanucleus.org   Twitter: @datanucleus)

Reply via email to