I have used both jooq and hibernate with many projects. Both tools are very capable.
Other than that, a quick summary : Hibernate : 1) Requires more learning. As Witold said, your first project with this framework can easily turn into a nightmare. You may step into every single trap if you don't have a good understanding of how it works under the hood. 2) Hibernate is good at loading large graphs of objects, eg: collections of customers + their individual collection of orders (+ orderdetails, +products + ATV info). Such things require more job with jooq. 3) I would not use Hibernate on an existing database which I don't have full DDL control on. 4) Never trust people saying that using hibernate saves you from knowing SQL 5) Stick to simple mappings, don't try to achieve pure OO. 6) If most of your project consists in loading tabular data sets (eg: aggregates, reporting) skip hibernate Jooq : 1) If you are fluent with SQL, there isn't much to learn, you'll feel right at home 2) Excellent for writing even the most complex queries, correlated queries, anti-joins, aggregates, invoking stored procedures, on hibernate you'd have to revert to raw JDBC for most of these things 3) Jooq doesn't introduce any constraint in the way you design your database, excellent if you need to use an existing DB. 4) Jooq (to my knowledge) doesn't do caching, on the other hand, many people find hibernate session cache misleading. To each his own. Both solutions aren't mutually exclusive, I have written an hybrid app using hibernate for business logic and Jooq for reporting/statistics/aggregates and I am very satisfied of the result. It is easy to obtain a JDBC connection from hibernate because their authors knew that user would have no choice but to use raw SQL in some situations. Jooq factories only require a JDBC connection, they are cheap to create, so there is no reason not to use them for all your non-ORM needs. Le mercredi 18 février 2015 21:44:49 UTC+1, Robert Liguori a écrit : > > Hi, we've been doing just basic SQL with JDBC... but our next project is > much more complex so we are looking at Hibernate for an ORM solution... but > the Hibernate community appears to be dead. > > Note that I just stumbled upon jOOQ. Are there any shortfalls with jOOQ? > Does it rival Hibernate? > > If I was going to try to sell this API to my management over Hibernate, > what would I tell them? > > Thank you so much, > Robert > -- 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.
