2017-03-20 15:45 GMT+01:00 Thomas GILLET <[email protected]>:

> Hello Lukas,
>
> Don't apologize for the delay, we all have a day job (and a night life,
> hopefully) to keep us busy.
>

Don't know if you noticed, but this *is* my day job. ;)
Night life: sure. My kid wakes me up 3x per night, if that counts.


> Plus, I think your response time already beats any other support ;)
>

Alright, good to know ;)

Well, I thought about that again, and I was wondering.
> When using JPA to simplify a complex schema, writing (jOOQ) queries on the
> database level may hinder this simplification.
> I mean, JPQL allows to stay on the JPA model side, not worrying about
> mapping details.
>

Hold your horses. JPQL bypasses first and second level query caches and
suffers from 1-2 other problems that aren't mentioned on a high level
discussion.
But anyway, I know what you mean :)


> Would not some kind of  jOOJPQL make sense in that case ?
>

You mean criteria query?


> For example, I have a very ugly schema with bad, incoherent column and
> table names, lots of room for @Embedded classes... It would be cool to have
> generated fields named after the JPA model, including embedded objects.
>

I'm not 100% sure if I follow, but there is a feature request for embedded
records to be generated:
https://github.com/jOOQ/jOOQ/issues/2530


> This example is only about generation but there is more to JPA... i.e you
> mentioned fetch joins earlier...
>
> Hope I'm not going over the dark side of something with this jOOJPQL
> talk...
>

Don't know yet :) I think that JPQL is a half assed query language that
wasn't well thought through (like SQL) and responded to quick needs (like
jOOQ's DAOs). Fetch Joins are a quick win. MULTISET would have been the
right solution (again). *Especially* in JPA, as that would be perfect for
an ORM.

Nevertheless, there's always room for improvement (and there are always
interesting features to steal).

Actually, I think implementing a recursive tree would be both easier and
> funnier (optimization-wise) than a regular entity tree.
> What a shame I've no use for that in my application!
>

You may have no use, but you may have some (free?) time! :)

Cheers,
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