# @ejbgen:value-object Annotation

This tag specifies whether EJB object references in a generated value object should be represented as a value object or a local interface. That is, when a value object is generated for a CMP entity bean, it contains al the EJB's fields. If one of these fields is another EJB - in most cases this would be a CMR field used to model an entity relation - you can choose to have this field represented as a value object or a local interface.

## Scope

Class tag on entity beans.

## Syntax

@ejbgen:value-object

reference="Local/Value"

## Attributes

reference

Required. Specifies how EJB object references in a value object class should be represented. Valid values are Local and Value.

## Remarks

The following rules apply to this tag's use:

- When this tag is not specified for an entity bean, EJB object references in a value object are represented as value objects.
- When EJB object references are represented as value objects, the refered entity beans must define or auto-generate its value object class.

## Related Topics

@ejbgen:file-generation Annotation