Annotation Interface FetchProfileOverride


@Target({METHOD,FIELD}) @Retention(RUNTIME) @Repeatable(FetchProfileOverrides.class) public @interface FetchProfileOverride
Overrides the fetching strategy for the annotated association in a certain named fetch profile. A "strategy" is a fetching method, together with the timing. If mode() and fetch() are both unspecified, the strategy defaults to eager join fetching.

The specified profile name must match the name of an existing fetch profile declared using the @FetchProfile annotation.

Since:
6.3
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of the fetch profile in which this fetch mode should be applied.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The timing of association fetching in the named fetch profile.
    The method that should be used to fetch the association in the named fetch profile.
  • Element Details

    • profile

      String profile
      The name of the fetch profile in which this fetch mode should be applied.
    • mode

      FetchMode mode
      The method that should be used to fetch the association in the named fetch profile.
      Default:
      JOIN
    • fetch

      FetchType fetch
      The timing of association fetching in the named fetch profile.
      Default:
      EAGER