Hi Akash,
Thanks for sharing your ideas.
Indeed, the generated POJOs (as well as DAOs, records, etc.) model a 1:1 relationship with the underlying table's raw data. jOOQ does not attempt to implement an object graph representation of your relational model, just like your relational database doesn't actually model the object graph (it has constraints, and those can map to a graph representation, but it really doesn't implement a graph, inside of your RDBMS).
Should we evolve more into the direction of a true ORM? That's been discussed on this list and elsewhere many times in the past. It's a tradeoff. By not doing this, and not going into the weird edge cases of populating object graphs from SQL queries (deduplication, N+1, caching, identity management etc. etc.) jOOQ could invest more into much much better SQL support. jOOQ is exceptionally strong at dynamic SQL and type safe mapping, for example. You won't find a match out there. jOOQ is weak at object graph persistence, because that has never been the focus.
Starting from jOOQ 3.14 (with SQL/JSON and SQL/XML support) as well as jOOQ 3.15 (with MULTISET and nested record support), jOOQ embraces more advanced ORDBMS features. It is now easy to project nested collections and data structures in a type safe way. This is extremely powerful both in jOOQ and in standard SQL, and I have not yet seen this power in other ORMs, to this extent. You can now populate object trees (not graphs) from SQL queries in a type safe way. The idea here is that you want to map arbitrary queries to arbitrary tree structures. Some ORMs claim that this is an edge case, and people mostly want to always fetch the entirety of the graph as stored in the database, without any fancy ad-hoc projections or anything.
I think this is wrong. The edge case is to fetch *everything* (which is mostly being done out of laziness, and leads to inefficiencies, because the projections are too big, and the joins can't be eliminated, etc.), the common case is to fetch exactly what you need, and push as much computation into the database as possible, e.g. using aggregation, etc. So, jOOQ aims to offer as many powerful querying primitives as possible, and once they're stable, adds more convenience to simplify the case where you do want to project everything.
It's possible, of course, to generate nested child collections and references to parent entities also in POJOs in the future, to allow users to opt in to mapping everything all the time. This hasn't been explored yet. Even if this was implemented, it probably won't work the way you're expecting now, certainly not via JPA annotations. The biggest problem in any such approach is the fact that jOOQ lets you work only with data (tuples, values, etc.) whereas the expectation of using an ORM is to work with graphs of objects (classes with identity). The concept of an identity is very weird in SQL. It was introduced in ORDBMS via REF types, but apart from Oracle, I haven't seen any mature implementations in the wild, and even within Oracle, hardly anyone uses those ORDBMS extensions. PostgreSQL and Informix (the other 2 ORDBMS) didn't go this far, and stayed in tuple/value land, where nesting of data structures is possible, but only in tree form, not in graph form. For example, if you have a many-to-many relationship and wish to materialise that in graph form, then you'll expect the graph to be consistent (A1 references multiple B, and each B must also reference the same A1 instance). JPA implementations don't implement this correctly, if I'm not mistaken? They leave collection consistency management to the user. They don't have many-to-many capable collection types, such as Eclipse EMF, for example. That's a tradeoff to improve usability, I guess, you can use any ArrayList or HashSet to model your associations. The point I'm trying to make is that the more you think about object graph persistence, the hairier it gets.
Thus, my claim that you can already do what you need to do with MULTISET, etc. It's just not going to work the way you expected (from JPA). I can't tell you whether you're right or whether jOOQ is right. jOOQ has this vision. You have your expectations. Up to you to decide whether jOOQ's visions align with your expectations.