1. Is it possible to reuse auto generated RecordMappers from the dao
objects? I have been trying to find a way to do something like.
List<User> users = using(configuration())
.selectFrom(Tables.USER)
.from(Tables.USER)
.join(Tables.ROLES)
.onKey()
.where(Tables.ROLES.ROLE.eq("admin"))
.fetch()
.map(mapper());
This doesn't quite work is there a way to do it? Essentially a simple join
and only return a pojo from one of the tables.
2. Is there a way to return multiple mapped pojos from a query. Possibly
Combining JOOQ and JOOL or something.
List<Tuple2<User, Role>> users = using(configuration())
.selectFrom(Tables.USER)
.from(Tables.USER)
.join(Tables.ROLES)
.onKey()
.fetch()
.map(user.mapper(), role.mapper());
I have been using slick in scala which allows you to tuple a bunch of case
classes into a single result. I was curious if you can do something
similar in JOOQ easily.
--
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.