<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-persistence-heavyweight-championship-jpa-vs-jooq-by-pasha-finkelshteyn-catherine-edelveis-jgmitmy6f" -->

---
title: The Persistence Heavyweight Championship: JPA vs. jOOQ...
description: Two BellSoft developer advocates stage a debate-style comparison of JPA/Hibernate versus jOOQ across several rounds: development speed, type safety, N+1 query...
canonical: https://daily.dev/posts/the-persistence-heavyweight-championship-jpa-vs-jooq-by-pasha-finkelshteyn-catherine-edelveis-jgmitmy6f
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Persistence Heavyweight Championship: JPA vs. jOOQ by Pasha Finkelshteyn / Catherine Edelveis | daily.dev
og:description: Two BellSoft developer advocates stage a debate-style comparison of JPA/Hibernate versus jOOQ across several rounds: development speed, type safety, N+1 query...
og:url: https://daily.dev/posts/the-persistence-heavyweight-championship-jpa-vs-jooq-by-pasha-finkelshteyn-catherine-edelveis-jgmitmy6f
og:image: https://api.daily.dev/og/posts/jgMITmy6f.png
og:image:alt: The Persistence Heavyweight Championship: JPA vs. jOOQ by Pasha Finkelshteyn / Catherine Edelveis
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Persistence Heavyweight Championship: JPA vs. jOOQ by Pasha Finkelshteyn / Catherine Edelveis

**[Spring I/O](https://daily.dev/sources/springio)** · 50 min read · 0 upvotes · 0 comments

## Summary

Two BellSoft developer advocates stage a debate-style comparison of JPA/Hibernate versus jOOQ across several rounds: development speed, type safety, N+1 query management, write-heavy operations, runtime performance, schema evolution, and pricing/maintenance. JPA is praised for its convention-driven abstractions, cascading operations, Spring Data integration, and Hibernate processor's static metamodel generation, while jOOQ is championed for direct SQL control, generated type-safe records/DAOs, database-first code generation, and compile-time failure on schema mismatches. They cover cascade types, fetch strategies and N+1 problems, Cartesian products, caching (first/second-level, stateless sessions), dynamic queries, batch updates, and licensing/maintenance differences (jOOQ maintained largely by one person vs. Hibernate's broad community and Red Hat backing). The audience votes after each round, ending in a tie.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=yAish_3P3-I>

## Questions this post answers

### What is the difference between JPA cascade type ALL and the individual cascade types like PERSIST, MERGE, and DETACH?

Cascade type ALL includes all five individual cascade behaviors combined: PERSIST (saving a parent automatically saves children), MERGE (updating a parent updates or reattaches children), DETACH (removing a parent from the session also detaches children), REMOVE (deleting a parent deletes children), and REFRESH (reloading a parent also reloads children from the database).

_daily.dev surfaces practical JPA breakdowns like this for developers untangling entity relationship behavior._

### How can I avoid N+1 select problems when using Hibernate lazy fetching?

Use the lazy fetch type strategy combined with an explicit JOIN FETCH in the query to load related entities in a single select instead of one query per row, and apply the @BatchSize annotation to fetch related children in configurable batches (e.g., 20 or 30 at a time) rather than individually, which avoids both N+1 selects and the memory bloat of a Cartesian product from eager fetching.

_Developers debugging N+1 issues in Hibernate can track fetch-strategy tips like this on daily.dev._

### Who maintains the jOOQ library and how does that compare to Hibernate's backing?

jOOQ is maintained by a single person, Lukas Eder, through his company DataGeekery in Switzerland, though it is licensed under Apache 2 and described as a viable enough business that it could be sold if something happened to him. Hibernate, by contrast, has been funded and supported for over 20 years, is used in more than 400,000 repositories, has over 600 contributors, and is backed commercially by Red Hat.

_When weighing jOOQ against Hibernate for a project, developers compare maintenance risk and community size on daily.dev._

## Similar posts on daily.dev

- [Meet Jos Roseboom](https://daily.dev/posts/meet-jos-roseboom-slleuwote) · Vlad Mihalcea · 3 upvotes · 1 comments

---

Tags: [#java](https://daily.dev/tags/java), [#sql](https://daily.dev/tags/sql)

[View this post on daily.dev](https://daily.dev/posts/the-persistence-heavyweight-championship-jpa-vs-jooq-by-pasha-finkelshteyn-catherine-edelveis-jgmitmy6f)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Persistence Heavyweight Championship: JPA vs. jOOQ by Pasha Finkelshteyn / Catherine Edelveis","url":"https://daily.dev/posts/the-persistence-heavyweight-championship-jpa-vs-jooq-by-pasha-finkelshteyn-catherine-edelveis-jgmitmy6f","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-persistence-heavyweight-championship-jpa-vs-jooq-by-pasha-finkelshteyn-catherine-edelveis-jgmitmy6f"},"datePublished":"2026-09-27T07:26:28.993Z","dateModified":"2026-09-27T07:27:08.511Z","description":"Two BellSoft developer advocates stage a debate-style comparison of JPA/Hibernate versus jOOQ across several rounds: development speed, type safety, N+1 query...","image":"https://i.ytimg.com/vi/yAish_3P3-I/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/yAish_3P3-I/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Spring I/O","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Spring I/O","logo":"https://media.daily.dev/image/upload/s--e-TcwM9B--/f_auto,q_auto/v1790493985/logos/springio?_a=BAMAMicg0","url":"https://daily.dev/sources/springio"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-persistence-heavyweight-championship-jpa-vs-jooq-by-pasha-finkelshteyn-catherine-edelveis-jgmitmy6f","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"java,sql","timeRequired":"PT50M","video":{"@type":"VideoObject","name":"The Persistence Heavyweight Championship: JPA vs. jOOQ by Pasha Finkelshteyn / Catherine Edelveis","description":"Two BellSoft developer advocates stage a debate-style comparison of JPA/Hibernate versus jOOQ across several rounds: development speed, type safety, N+1 query...","thumbnailUrl":"https://i.ytimg.com/vi/yAish_3P3-I/sddefault.jpg","uploadDate":"2026-09-27T07:26:28.993Z","duration":"PT50M","url":"https://api.daily.dev/r/jgMITmy6f","embedUrl":"https://www.youtube.com/embed/yAish_3P3-I"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Spring I/O","item":"https://daily.dev/sources/springio"},{"@type":"ListItem","position":3,"name":"The Persistence Heavyweight Championship: JPA vs. jOOQ by Pasha Finkelshteyn / Catherine Edelveis"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-persistence-heavyweight-championship-jpa-vs-jooq-by-pasha-finkelshteyn-catherine-edelveis-jgmitmy6f#faq","mainEntity":[{"@type":"Question","name":"What is the difference between JPA cascade type ALL and the individual cascade types like PERSIST, MERGE, and DETACH?","acceptedAnswer":{"@type":"Answer","text":"Cascade type ALL includes all five individual cascade behaviors combined: PERSIST (saving a parent automatically saves children), MERGE (updating a parent updates or reattaches children), DETACH (removing a parent from the session also detaches children), REMOVE (deleting a parent deletes children), and REFRESH (reloading a parent also reloads children from the database). daily.dev surfaces practical JPA breakdowns like this for developers untangling entity relationship behavior."}},{"@type":"Question","name":"How can I avoid N+1 select problems when using Hibernate lazy fetching?","acceptedAnswer":{"@type":"Answer","text":"Use the lazy fetch type strategy combined with an explicit JOIN FETCH in the query to load related entities in a single select instead of one query per row, and apply the @BatchSize annotation to fetch related children in configurable batches (e.g., 20 or 30 at a time) rather than individually, which avoids both N+1 selects and the memory bloat of a Cartesian product from eager fetching. Developers debugging N+1 issues in Hibernate can track fetch-strategy tips like this on daily.dev."}},{"@type":"Question","name":"Who maintains the jOOQ library and how does that compare to Hibernate's backing?","acceptedAnswer":{"@type":"Answer","text":"jOOQ is maintained by a single person, Lukas Eder, through his company DataGeekery in Switzerland, though it is licensed under Apache 2 and described as a viable enough business that it could be sold if something happened to him. Hibernate, by contrast, has been funded and supported for over 20 years, is used in more than 400,000 repositories, has over 600 contributors, and is backed commercially by Red Hat. When weighing jOOQ against Hibernate for a project, developers compare maintenance risk and community size on daily.dev."}}]}
```

