I'd like to know if there is an article or a forum thread about JOOQ vs.Criteria API (with generated metamodels)?
What is the main differences between both? What are the advantages of JOOQ?
The simplest answer is:
- jOOQ is typesafe SQL
- Criteria API is typesafe JPQL
From there on, you can start comparing the expressive power and usefulness of both SQL and JPQL. In other words, before comparing the above APIs, you should really think about a SQL vs. ORM/JPA-based architecture.
Being the jOOQ vendor, we believe that JPA / JPQL (and thus Criteria API) will not be able to follow suit with the expressivity of the SQL standard and of various dialects. Our views are documented in various places: