Top Description Methods
org.hibernate.annotations

public @Interface LazyGroup

extends Annotation
Annotations
@Target:METHOD, FIELD
@Retention:RUNTIME
Imports
java.lang.annotation.Retention, .Target

Specifies the fetch group for a persistent attribute of an entity class. This annotation has no effect unless bytecode enhancement is used, and field-level lazy fetching is enabled.

A fetch group identifies a set of related attributes that should be loaded together when any one of them is accessed. By default, all non-collection attributes belong to a single fetch group named "DEFAULT". The fetch group for a given lazy attribute may be explicitly specified using the value() member of this annotation.

For example, a field annotated @Basic(fetch=LAZY) @LazyGroup("extra") belongs to the fetch group named "extra", and is loaded whenever an attribute belonging to the "extra" fetch group is accessed.

Note that field-level lazy fetching is usually of dubious value, and most projects using Hibernate don't even bother enabling the bytecode enhancer.

Author
Steve Ebersole
See Also
Cache#includeLazy()

Method Summary

Modifier and TypeMethod and Description
public String
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()