Package org.hibernate.annotations
Annotation Type 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:
- select fetching is used for lazy fetching, and
- join fetching is used for eager fetching.
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)
impliesfetch=EAGER
.- See Also:
FetchMode
,FetchProfile
-
-
Element Detail
-
value
FetchMode value
The method that should be used to fetch the association.
-
-