It's possible to map foreign key fields in one-to-many and one-to-one
relationships to the primary key fields. All is needed is to assign the same
names to the corresponding foreign and primary key fields.

Relationships are assigned between ejbCreate and ejbPostCreate. This
means that relationships are accessible in ejbPostCreate and not in ejbCreate.
Relationships are established and removed only with creation and
removal of entities. Modifications with abstract CMR accessors are not
allowed as they change primary key values.

If ONE side doesn't exist CMR on the MANY side will return null value.
If MANY side doesn't exist CMR on the ONE side will return empty collection.

If cascade-delete is specified then removal of the ONE side will
remove the related MANY side. In this case, ONE side is removed first
breaking the relationship, i.e. CMR field on the MANY side in ejbRemove will return 
null.

alex




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to