JOOQ has been really helpful. Like others have shared,  I think mapping is 
where I spend some considerable amount of time when using Jooq. I have not 
really been leveraging JPA column annotation (appears you have or will be 
deprecating support).  I have had to develop utilities to support mapping 
with the help of Modelmapper library. For queries with multiple joins, how 
do you effectively deal with duplicate records  in results (from resulting 
joins) and have them mapped to collection of different pojos without 
duplicates with current mapping strategies? With multiple selects, I can 
make do with the simplistic mappings but that is like going N + 1 queries. 
 I will like to know how folks are dealing with this without too many code 
duplication or if there are libraries that can help or examples.

On a side note I find the amount of options (methods available, overloaded 
etc) when using jooq api to be a distraction. Sometimes get the sense I 
don't know enough about the tool. All the same Jooq is a great tool and 
thanks for the effort invested to provide an alternative when the industry 
is "almost" drown in Hiba/jpa as a requirement for success.


Dayo 

On Wednesday, July 6, 2016 at 8:16:44 AM UTC-4, Lukas Eder wrote:
>
> Dear group,
>
> Part of jOOQ's success is its incredible amount of convenience methods 
> that help reduce the boiler plate code at your side. We do this with 
> massive overloading of API, for instance, when you work with fetch(), you 
> may have noticed how many different types of fetch() there are in jOOQ.
>
> Just now, I have added yet another convenience method. A Converter 
> constructor:
> https://github.com/jOOQ/jOOQ/issues/5398
>
> It looks like this:
>
>     static <T, U> Converter<T, U> of(
>         Class<T> fromType,
>         Class<U> toType,
>         Function<? super T, ? extends U> from,
>         Function<? super U, ? extends T> to
>     ) { ... }
>
> And also:
>
>     static <T, U> Converter<T, U> ofNullable(
>         Class<T> fromType,
>         Class<U> toType,
>         Function<? super T, ? extends U> from,
>         Function<? super U, ? extends T> to
>     ) {
>         return of(
>             fromType,
>             toType,
>             t -> t == null ? null : from.apply(t),
>             u -> u == null ? null : to.apply(u)
>         );
>     }
>
>
> The above allows for creating simple ad-hoc, one-liner converters, such as:
>
>     Converter<String, Integer> converter =
>     Converter.ofNullable(String.class, Integer.class, Integer::parseInt, 
> Object::toString);
>
> What's your biggest "itch" in the jOOQ API, which jOOQ could "scratch", or 
> rather, make go away by adding new convenience API?
>
> All ideas welcome!
> 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