> > 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

That should be

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


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

Reply via email to