@ejb.relation

Scope: method

Multiplicity

(0..1): You can use this tag zero or one time in the Java™ source file.

Purpose

This tag defines a relationship between entity beans. Applies to entity beans, EJB 2.0 (CMP 2.x)

Parameters

Parameter Type Applicability Description Mandatory
name text   The name of the relation. For bidirectional relationships, specify the same name on both sides. true
role-name text   Name of the relationship role. true
cascade-delete text   Indicates whether or not the application server should perform cascade deletes. If yes, specify cascade-delete="yes". false
target-ejb text   Name of the EJB on the other side of the relation. Should only occur if the relation is unidirectional. false
target-role-name text   Name of the relationship role on the other side of the relation. Should only occur if the relation is unidirectional. false
target-cascade-delete text   Indicates whether or not the application server should perform cascade deletes for the other side of the relation. If yes, specify cascade-delete="yes". Should only occur if the relation is unidirectional. false
target-multiple text   If this EJB represents a "many" side of the other side of the relation, specify target-multiple="yes". If not, do not use this parameter, or specify target-multiple="no". Use this tag only if the relation is unidirectional. false

WebSphere-Specific Tags

WebSphere-specific tags can be used in conjunction with @ejb-relation tags:

@websphere-cmr.join-table

@websphere-cmr.fk

@websphere-cmr.column

Related reference
@ejb.bean
@ejb.create-method
@ejb.ejb-external-ref
@ejb.ejb-ref
@ejb.env-entry
@ejb.facade
@ejb.facade-method
@ejb.finder
@ejb.home
@ejb.home-method
@ejb.interface
@ejb.interface-method
@ejb.permission
@ejb.persistence
@ejb.persistence (method)
@ejb.pk
@ejb.pk-field
@ejb.remote-facade
@ejb.resource-env-ref
@ejb.resource-ref
@ejb.security-identity
@ejb.security-role-ref
@ejb.select
@ejb.session
@ejb.transaction
@ejb.util
@ejb.value-object
@ejb.value-object-method
Terms of use | Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.