Thanks for correcting Andy. I learned now that you can create a
List<Object[]> collection from a JDOQL query, nice! Apache Isis however can
only render List<Object> collections. Would make a nice feature though to
support List<Object[]> rendering (pivot tables anyone?).

On 22 January 2016 at 20:36, Andy Jefferson <a...@datanucleus.org> wrote:

> On Friday 22 Jan 2016 19:25:24 Andy Jefferson wrote:
> > > > 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
>
>
> Duh, and fixing the Person alias also that should be
>
> SELECT this, t FROM mydomain.Person WHERE pt.person == this && pt.template
> == t
> VARIABLES mydomain.PersonTemplate pt, mydomain.Template t
>
>
> but then its simple if you just try it.
>
>
> --
> Andy
> DataNucleus (Web: http://www.datanucleus.org   Twitter: @datanucleus)
>

Reply via email to