Jakarta Persistence (JPA) Method

FetchType fetch


(Optional) Whether the collection should be lazily loaded or must be eagerly fetched.
  • The EAGER strategy is a requirement on the persistence provider runtime that the associated entity must be eagerly fetched.
  • The LAZY strategy is a hint to the persistence provider runtime.

If not specified, defaults to LAZY.

Default:
FetchType.LAZY
Since:
Jakarta Persistence (JPA) 1.0