I am a newbie to Java Persistence API and Hibernate.
What is the difference between FetchType.LAZY and FetchType.EAGER in Java Persistence API?
As per my knowledge both type of fetch depends your requirement.
FetchType.LAZY is on demand (i.e. when we required the data).
FetchType.LAZY
FetchType.EAGER is immediate (i.e. before our requirement comes we are unnecessarily fetching the record)
FetchType.EAGER