Lukas is right that its non trivial. I'm sort of using Spring JDBC + jOOq + my own half assed ORM.
I got many to one to sort of work using JPA annotations (@ManyToOne + @JoinColumn) and the ResultSetMetaData to figure out how to transform the child object from the ResultSet. One to many and many to many will be a PITA and in my mind defeats the goals of jOOQ. If that feature (child fetching) interests you should check Ajave Ebean. On Tuesday, September 18, 2012 4:34:55 PM UTC-4, Lukas Eder wrote: > > Hello, > > > [...] for example by the mean of dedicated > > collection classes? > > I'm not sure what you mean by "dedicated collection classes". Could > you elaborate this idea? It might just correspond to this old feature > request here: > https://github.com/jOOQ/jOOQ/issues/345 > > > However, while I have noticed methods for navigating through relations I > > could not find ways to avoid the well-known n+1 issue other than hand > > writing JOINS, IN queries or SubSelects when manipulating collections of > > record. > > I think what you're looking for is a feature request that was recently > expressed at the JUGS in Zurich: > https://github.com/jOOQ/jOOQ/issues/1502 > > This involves adding support for selecting navigation paths that would > be automatically transformed to "equivalent" inner / outer / > semi-joins. I have spent some time investigating the idea, finding it > quite non-trivial to implement. Any ideas, hints are very welcome, > though! > > Cheers > Lukas > > 2012/9/18 Stephane Cl <[email protected] <javascript:>>: > > Hello, > > Jooq generated record classes make single table based operation very > easy. > > However, while I have noticed methods for navigating through relations I > > could not find ways to avoid the well-known n+1 issue other than hand > > writing JOINS, IN queries or SubSelects when manipulating collections of > > record. While it is clearly not an easily solved issue, I am wondering > if > > there has already been some investigation about possible ways to enable > > preloading of relations in some way, for example by the mean of > dedicated > > collection classes? > > > > Best >
