@ejbgen:relationship-caching-element Annotation

This tag specifies an eager relationship loading definition. This definition can be used by a query method to enable eager loading of a entity bean's related bean(s), as defined by an entity relationship.

Scope

Class tag on a CMP entity bean.

Syntax

@ejbgen:relationship-caching-element

caching-name="EagerLoadingDefinitionName"

cmr-field="CMRFieldList"

[group-name="FieldGroupList"]

[id="TagID"]

[parent-id="TagIDOfParent"]

Attributes

caching-name

Required. Specifies the name of this eager relationship loading definition.

cmr-field

Required. Specifies a comma-separated list of one or more CMR field names holding the related entity beans that need to be loaded.

group-name

Optional. Specifies a comma-separated list of one or more field group names to be loaded for the entity beans specified in the cmr-field attribute.

id

Optional. Specifies the ID of this eager relationship loading definition.

parent-id

Optional. Specifies a parent for this eager relationship loading definition.

Remarks

This tag specifies one set of CMR fields, and optionally field-groups, that can be used by this entity bean's finder or select method to load related beans as part of the query results. An entity bean can have multiple tags to specify different eager loading relationships as required. Also, eager relationship loading can be nested such that for an eagerly loaded bean, its entity relations are loaded as well. For more details, see Accelerating Entity Bean Data Access.

Related Topics

Accelerating Entity Bean Data Access

Entity Relationships

@ejbgen:select Annotation

@ejbgen:finder Annotation

@ejbgen:relation Annotation