Annotation Interface FetchProfile.FetchOverride

Enclosing class:
FetchProfile

@Target({TYPE,PACKAGE}) @Retention(RUNTIME) public static @interface FetchProfile.FetchOverride
Overrides the fetching strategy for a particular association in the named fetch profile being defined. A "strategy" is a fetching method, together with the timing. If mode() and fetch() are both unspecified, the strategy defaults to eager join fetching.

Additional fetch strategy overrides may be specified using the @FetchProfileOverride annotation.

See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The association whose default fetch strategy is being overridden.
    The entity containing the association whose default fetch strategy is being overridden.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The timing of association fetching in the fetch profile being defined.
    The method used for fetching the association in the fetch profile being defined.
  • Element Details

    • entity

      Class<?> entity
      The entity containing the association whose default fetch strategy is being overridden.
    • association

      String association
      The association whose default fetch strategy is being overridden.
    • mode

      FetchMode mode
      The method used for fetching the association in the fetch profile being defined.
      Default:
      JOIN
    • fetch

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