I am a newbie to Java Persistence API and Hibernate.
What is the difference between FetchType.LAZY and FetchType.EAGER in Java Persistence API?
LAZY: It fetches the child entities lazily i.e at the time of fetching parent entity it just fetches proxy(created by cglib or any other utility) of the child entities and when you access any property of child entity then it is actually fetched by hibernate.
EAGER: it fetches the child entities along with parent.
For better understanding go to Jboss documentation or you can use hibernate.show_sql=true for your app and check the queries issued by the hibernate.