Sun Java System Application Server Enterprise Edition 8.2 Developer's Guide

fetched-with

Specifies the fetch group configuration for fields and relationships. The fetched-with element has different allowed and default subelements based on its parent element and the data types of the fields.

Managed fields are multiple CMP or CMR fields that are mapped to the same column. A managed field can have any fetched-with subelement except <default/>. For additional information, see Managed Fields.

Superelements

cmp-field-mapping, cmr-field-mapping (sun-cmp-mappings.xml)

Subelements

The following table describes subelements for the fetched-with element.

Table A–46 fetched-with Subelements

Element  

Required  

Description  

default

exactly one subelement is required 

Specifies that a CMP field belongs to the default hierarchical fetch group, which means it is fetched any time the bean is loaded from a database. Enables prefetching of a CMR field. 

level

exactly one subelement is required 

Specifies the level number of a hierarchical fetch group. 

named-group

exactly one subelement is required 

Specifies the name of an independent fetch group. 

none

exactly one subelement is required 

Specifies that this field or relationship is placed into its own individual fetch group, which means it is loaded from a database the first time it is accessed in this transaction.