Try this instead:

                 ctx.insertInto(PROBANDSET)
                .set(PROBANDSET.ID <http://probandset.id/>, newsetId)
                .set(PROBANDSET.NAME <http://probandset.name/>,
pedfile.getName())
                .set(PROBANDSET.PROBANDS,
                     ctx.select(arrayAgg(PERSON.ID <http://person.id/>)
).from(ctx.select(PERSON.ID <http://person.id/>)
                                                          .from(PERSON)
                                                          .where(
PERSON.NAME.in <http://person.name.in/>(idList))
                                                          .orderBy(PERSON.ID
<http://person.id/>).asTable(PERSON.getName())))
                .execute();

The explanation is simple: Your derived table (select in FROM clause) needs
an alias. That alias is now PERSON. The only reasonable alias if you want
to reference the PERSON.ID from the outer table.

In your example, you renamed the table to "id", which means, you'd have to
reference an "id".ID column in the outer query. That's possible too, but
perhaps a bit confusing?

arrayAgg(PERSON.as("id").ID)

Hope this helps,
Lukas

-- 
You received this message because you are subscribed to the Google Groups "jOOQ 
User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to