Separate queries are certainly an option, I was just hoping to avoid that
and keep my round trips to the database to a minimum.

On Sat, Feb 17, 2018 at 7:33 AM, Rob Sargent <robjsarg...@gmail.com> wrote:

>
> > So, given a query that should return only a single "main" object, with
> one or more children, is there a good way for jOOQ to represent that,
> without returning a structure that assumes multiple "parent" objects the
> way that Map does. I hope that is a clearer expression of what I'm looking
> for.
> >
> Do separate queries, one for the parent (fetchOne()) and one for the
> children (fetch()) is not an option?  I can imagine a single sql statement
> which would do what you want (one row from here and some from there) other
> than a union which might work in this case as the “here” and “somewhere”
> are the same.  This then expands to a recursive CTE which can get you your
> entire ancestry.
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "jOOQ User Group" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/jooq-user/iGsEhmqjf7w/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> jooq-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jason Bennett, jaso...@acm.org
E pur si muove!

-- 
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 jooq-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to