Annotation Interface Fetch


@Target({METHOD,FIELD}) @Retention(RUNTIME) public @interface Fetch
Specifies the default fetching method for the annotated association.

When this annotation is not explicitly specified, then:

The default fetching method specified by this annotation may be overridden in a given fetch profile.

Note that join fetching is incompatible with lazy fetching, and so @Fetch(JOIN) implies fetch=EAGER.

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The method that should be used to fetch the association.
  • Element Details

    • value

      FetchMode value
      The method that should be used to fetch the association.