I am a newbie to Java Persistence API and Hibernate.
What is the difference between FetchType.LAZY and FetchType.EAGER in Java Persistence API?
The main difference between the two types of fetching is a moment when data gets loaded into a memory. I have attached 2 photos to help you understand this.
Eager fetch
Lazy fetch