Hibernate: Myths & Over-Engineering. ORMs vs SQL vs Hexagonal — Gavin King
The Marco Show1 Okt 2025

Hibernate: Myths & Over-Engineering. ORMs vs SQL vs Hexagonal — Gavin King

📺 Note: This episode contains screensharing and live coding examples that work best visually. If you’d like to follow along, check out the full video version on YouTube: https://youtu.be/Qvh3VFlvJnE.

Gavin King (creator of Hibernate) joins Marco to cut through the myths of Java persistence. When should you skip layers of repositories and just write SQL, or even model database views? What actually causes lazy-loading pain, and how do stateless sessions help? We cover Hibernate, JPA, and where Jakarta Data is headed, plus pragmatic advice for legacy schemas, performance, and keeping your code DRY.


💡 Topics in this episode:

• SQL vs repositories (and why views can be your adapter layer)

• The three inheritance strategies, and the trap of table-per-class

• Stateless sessions vs stateful persistence contexts

• LazyInitializationException explained (and avoided)

• DRY first: let architecture emerge via refactoring

• Jakarta Data 1.0/1.1: annotation processing, stateful repos, dynamic queries

• Performance rule-of-thumb: minimize round-trips


⏱️ Timestamps

(00:00) Teaser

(01:00) Gavin King intro and early Hibernate motivation

(03:59) Old-school open-source culture and discovery

(08:39) SQL isn’t hard: minimize DB round-trips

(10:03) “Leaky abstractions are good” (and why)

(12:04) Architecture should emerge from code

(15:44) DRY as commandment #1

(22:05) Reviewing a typical Spring Data setup (and pitfalls)

(25:39) Inheritance strategies: joined vs single table vs table-per-class

(30:06) One screen? Just write a SQL query (pragmatism)

(33:08) When ORM shines: operations over graphs

(35:22) Use views to adapt messy legacy schemas

(43:18) Jakarta Data repos: annotation-driven, step-into-able

(44:59) Stateless Session: less magic, explicit updates

(48:51) Jakarta Data 1.1: stateful repos, dynamic queries, reactive

(01:24:22) Rapid fire questions

(01:33:15) Features Gavin would delete and lessons learned

(01:42:30) Giveaway


New episodes every other Wednesday. Subscribe for deep, developer-focused conversations.

Denne episoden er hentet fra en åpen RSS-feed og er ikke publisert av Podme. Den kan derfor inneholde annonser.

Episoder(23)

Databases, AI Agents and Death by Tooling - Michael Simons | The Marco Show

Databases, AI Agents and Death by Tooling - Michael Simons | The Marco Show

Michael Simons, a longtime Java developer and Neo4j engineer, joins Marco to talk about the engineering principles that have stayed relevant across decades of changing technologies. The conversation c...

2 Sep 1h 9min

40 Years of Programming: What AI Changes and What It Never Will - Venkat Subramaniam | The Marco Show

40 Years of Programming: What AI Changes and What It Never Will - Venkat Subramaniam | The Marco Show

Venkat Subramaniam joins Marco to talk about what AI is really changing for developers. They discuss why AI often impresses novices more than experts, why “AI first” is the wrong mindset, and why crit...

19 Aug 1h 24min

From Spring Framework to Spring AI: 13 Years of Building What Developers Need - Sébastien Deleuze | The Marco Show

From Spring Framework to Spring AI: 13 Years of Building What Developers Need - Sébastien Deleuze | The Marco Show

Sébastien Deleuze, a longtime Spring Framework committer and member of the Spring AI team, joins Marco to talk about how 13 years on the Spring team shaped his pragmatic approach to software developme...

5 Aug 40min

Why AI Won't Replace Great Java Developers - Josh Long | The Marco Show

Why AI Won't Replace Great Java Developers - Josh Long | The Marco Show

Josh Long, Spring Developer Advocate at Broadcom, joins Marco to cover 25 years of Spring history and what the JVM's real shot at the AI era actually looks like. Josh has published a weekly blog since...

22 Jul 49min

The End of Traditional IDEs?: AI Workflows, Cursor, IntelliJ - Martin Lippert | The Marco Show

The End of Traditional IDEs?: AI Workflows, Cursor, IntelliJ - Martin Lippert | The Marco Show

Martin Lippert, longtime maintainer of Spring Tools and one of the people who has witnessed developer tooling evolve from Eclipse to VS Code, joins Marco to discuss how AI is transforming Java develop...

8 Jul 1h 5min

Why Scala Changed Programming Languages Forever - Martin Odersky | The Marco Show

Why Scala Changed Programming Languages Forever - Martin Odersky | The Marco Show

Martin Odersky, creator of Scala and co-designer of Java generics, joins Marco to trace the full arc from Pizza (the 1996 functional Java experiment) to Scala 3, and on to his vision for capabilities ...

3 Jun 54min

Java at Spotify: Microservices, MCP & AI Overload – Mohamed Aboullaite | The Marco Show

Java at Spotify: Microservices, MCP & AI Overload – Mohamed Aboullaite | The Marco Show

Mohamed Aboullaite, backend engineer at Spotify, Java Champion, Google Cloud Developer Expert, and Docker Captain, joins Marco to talk about building AI-powered integrations at scale, what software en...

20 Mai 42min

The Future of Java in the Age of AI Agents - James Ward | The Marco Show

The Future of Java in the Age of AI Agents - James Ward | The Marco Show

James Ward (Developer Advocate at AWS, Agentic AI Foundation Technical Committee Member) joins Marco to map out the fast-moving landscape of AI agents on the JVM. From MCP and ACP to Spring AI, Embabe...

22 Apr 1h 11min

Populært innen Teknologi

teknisk-sett
energi-og-klima
rss-kunstig-intelligens-med-elisabeth-maren-og-morten
pedagogisk-intelligens
rss-ai-forklart
shifter
elektropodden
fornybaren
lydartikler-fra-aftenposten
rss-snakk-om-sikkerhet
nasjonal-sikkerhetsmyndighet-nsm
tomprat-med-gunnar-tjomlid
rss-alt-som-gar-pa-strom
rss-larervarelset
rss-digitaliseringspodden
smart-forklart
rss-teknologioptimistene-en-podkast-om-teknologi-og-mennesker
rss-fish-ships
rss-ki-praten
rss-heis