By default, EclipseLink persistence provider uses a fetch type of javax.persitence.FetchType.EAGER: data must be eagerly fetched. If necessary, you can set fetch to FetchType.LAZY: this is a hint to the persistence provider that data should be fetched lazily when it is first accessed (if possible).

Eager

No

optional

By default, EclipseLink persistence provider assumes that the value of all (nonprimitive) fields and properties are optional and may be null.

True

No

The following example shows how to use this annotation to specify a fetch type of LAZY for a basic mapping.