The EAGER fetch is a requirement on the persistence provider runtime that data must be eagerly fetched ( fetch in a single instance of query )
The LAZY strategy is a hint to the persistence provider runtime that data should be fetched lazily when it is first accessed( fetch when its required as sub-queries).
For Example :
you might have an entity called Student and another entity called Courses .
The Student entity might have some basic properties such as id, name etc. as well as a property called Courses .
Now when you load a Student from the database, JPA loads its id, name fields for you. But you have two options for Courses : to load it together with the rest of the fields (i.e. eagerly) or to load it on-demand (i.e. lazily) when you call the Student s getCourses() method-This is called eager loading.
When a Student has many Courses it is not efficient to load all of its Courses with it when they are not needed. So in suchlike cases, you can declare that you want Courses to be loaded when they are actually needed. This is called lazy loading.