#231 FK fields mapped to PK fields support

v3.2
open
nobody
JBossCMP (36)
5
2002-12-24
2002-12-24
No

It's possible to map foreign key fields in one-to-many
and one-to-one relationships to primary key fields. All is
needed 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.

Discussion

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks