Перейти к содержимому

Lazy vs Eager Loading in JPA — and the N+1 Problem | Day 63

Be Software Engineer

0:00 / 0:00

Lazy vs Eager Loading in JPA — and the N+1 Problem | Day 63

2 просмотра · 3 часа назад
Be Software Engineer
36 подписчиков
2 просмотра · 3 часа назад
Day 63 of the Java Backend Development + Spring Boot course. Days 59-62 kept postponing one question: when does related data actually get loaded? Today answers it. In this video, you'll learn: Lazy vs. eager loading, and the default for each relationship type Why making everything eager is a trap What a LazyInitializationException really means, and the fix The N+1 query problem, and how show-sql exposes it Fixing it with JOIN FETCH A sensible default fetch strategy for real projects This is Lesson 63 of Phase 5: JPA + Hibernate + PostgreSQL. 📌 Previous — Day 62: Many-to-Many Relationships 📌 Next up — Day 64: Cascade Types 📚 Recommended Resources 📖 Spring in Action (5th Edition) — Craig Walls 👉 https://www.amazon.in/Spring-Action-F... As an Amazon Associate, I earn from qualifying purchases. 🛒 Recommended Coding Setup 💻 Laptop for Coding 👉 https://www.amazon.in/ASUS-Vivobook-i... ⌨️ Mechanical Keyboard 👉 https://www.amazon.in/dp/B07989JYRS?t... 🖱️ Wireless Mouse 👉 https://www.amazon.in/Logitech-Silent... 🎧 Headphones / Headset 👉 https://www.amazon.in/boAt-Rockerz-42... As an Amazon Associate I earn from qualifying purchases. #JavaBackend #SpringBoot #JPA #Hibernate #LearnJava