Skip to content
Thorben Janssen
  • BlogExpand
    • Tutorials
    • Hibernate Tips
    • Video Tutorials
  • Persistence Hub
  • Workshops
  • Consulting
  • Book
  • AboutExpand
    • About
    • Talks
    • Contact
Sign In
Thorben Janssen

AssociationMappingPage-Usability

  • FetchType: Lazy/Eager loading for Hibernate & JPA
    JPA | Hibernate Beginner

    FetchType: Lazy/Eager loading for Hibernate & JPA

    ByThorben Janssen

    Choosing the right FetchType is one of the most important decisions when defining your entity mapping. It specifies when your JPA implementation, e.g., Hibernate, fetches associated entities from the database. You can choose between EAGER and LAZY loading. The first one fetches an association immediately, and the other only when you use it. I explain…

    Read More FetchType: Lazy/Eager loading for Hibernate & JPAContinue

  • How to Choose the Most Efficient Data Type for To-Many Associations – Bag vs. List vs. Set
    Hibernate Performance

    How to Choose the Most Efficient Data Type for To-Many Associations – Bag vs. List vs. Set

    ByThorben Janssen

    Which data type should you use to map a to-many association with Hibernate? Is it better to use a Set or a List? That’s a very common question, and most developers are surprised when they look at the documentation and find out that these are not the only options. You can also use a Bag…

    Read More How to Choose the Most Efficient Data Type for To-Many Associations – Bag vs. List vs. SetContinue

  • Why you should avoid CascadeType.REMOVE for to-many associations and what to do instead
    JPA | Hibernate Advanced

    Why you should avoid CascadeType.REMOVE for to-many associations and what to do instead

    ByThorben Janssen

    The CascadeTypes REMOVE and ALL, which includes REMOVE, provide a comfortable option to remove an entity together with all its child entities. But it creates several issues for to-many associations, and you should only use it for to-one relationships.

    Read More Why you should avoid CascadeType.REMOVE for to-many associations and what to do insteadContinue

Join the Newsletter

Join 10k+ subscribers to get a persistence tip every weekday.

I will collect, use and protect your data in accordance with my privacy policy.

Level up your skills!

  • In-depth courses
  • Expert sessions
  • Monthly persistence news
Learn more!
Twitter YouTube Github Facebook Xing Linkedin
  • Disclaimer
  • Privacy Policy
  • Terms of Service
  • Imprint
  • Contact
  • Change privacy settings
  • Privacy settings history
  • Revoke consents

© 2025 Thorben Janssen, all rights reserved.

  • Blog
    • Tutorials
    • Hibernate Tips
    • Video Tutorials
  • Persistence Hub
  • Workshops
  • Consulting
  • Book
  • About
    • About
    • Talks
    • Contact
Search