Top Description Methods
org.hibernate.annotations

public @Interface FetchProfileOverride

extends Annotation
Annotations
@Target:METHOD, FIELD
@Retention:RUNTIME
@Repeatable:FetchProfileOverrides
Imports
jakarta.persistence.FetchType, java.lang.annotation.Repeatable, .Retention, .Target

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.

Author
Gavin King
Since
6.3
See Also
FetchMode, FetchProfile, FetchProfile.FetchOverride

Method Summary

Modifier and TypeMethod and Description
public FetchType
fetch()

The timing of association fetching in the named fetch profile.

public FetchMode
mode()

The method that should be used to fetch the association in the named fetch profile.

public String
profile()

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

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

fetchback to summary
public FetchType fetch()

The timing of association fetching in the named fetch profile.

modeback to summary
public FetchMode mode()

The method that should be used to fetch the association in the named fetch profile.

profileback to summary
public String profile()

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