Blog - The latest articles and news

Stay up to date with practical insights on backend engineering, system design, and building reliable software.

Lazy vs Eager Loading in JPA — What Gets Loaded and When

Published
Author
Eric Hanson
Backend Developer

JPA's fetch type determines when associated data is loaded from the database. Getting it wrong in either direction — too eager or too lazy — produces either unnecessary data transfer or N+1 queries. Here is the model and the correct defaults.

Read more

Tell us about your project

Our offices

  • Copenhagen
    1 Carlsberg Gate
    1260, København, Denmark
  • Magelang
    12 Jalan Bligo
    56485, Magelang, Indonesia