Package org.hibernate.annotations
Annotation Type 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. Ifmode()
andfetch()
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:
FetchMode
,FetchProfile
,FetchProfile.FetchOverride
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description String
profile
The name of thefetch profile
in which this fetch mode should be applied.
-
-
-
Element Detail
-
profile
String profile
The name of thefetch 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:
- org.hibernate.annotations.FetchMode.JOIN
-
-
-
fetch
FetchType fetch
The timing of association fetching in the named fetch profile.- Default:
- jakarta.persistence.FetchType.EAGER
-
-