Hello Ingo,

it might be really confusing.

If you need parent-child relationships, where child is removed when
its parent is being removed, you should use cascade-delete. This is by
the spec.
Foreign key constraints are used only for database schema generation.

alex

Friday, July 18, 2003, 2:09:16 PM, Ingo Bruell wrote:

IB> -----BEGIN PGP SIGNED MESSAGE-----
IB> Hash: SHA1

IB> Hi,

IB> i have tested a litle bit on cmr with constraints and wonder, why a entity
IB> was removed when depending entities exists. In my special case the reference
IB> id in the depending object was set to null and the referenced object was
IB> removed.

IB> I have not defined cascade-delete.

IB> Is this behavior correct ?

IB> For a test i have tried to remove the row with sql in the db and a got an
IB> exception. I think that is the right behavior.


IB> best regards

IB> Ingo Bruell

IB> - - ---
IB> <[EMAIL PROTECTED]>
IB> <ICQ# 40377720>
IB> Oldenburg  PGP-Fingerprint: CB01 AE12 B359 87C4 BF1C  953C 8FE7 C648 169E E5FC
IB> Germany    PGP-Public-Key available at pgpkeys.mit.edu

IB> -----BEGIN PGP SIGNATURE-----
IB> Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

IB> iQA/AwUBPxfHSo/nxkgWnuX8EQIVFQCgnba1nl9THQiSrRO6XvZrQbN9JygAn1/J
IB> opVwwZSXmTmuP7kDItpg3spe
IB> =8rgg
IB> -----END PGP SIGNATURE-----




IB> -------------------------------------------------------
IB> This SF.net email is sponsored by: VM Ware
IB> With VMware you can run multiple operating systems on a single machine.
IB> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
IB> same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
IB> _______________________________________________
IB> JBoss-user mailing list
IB> [EMAIL PROTECTED]
IB> https://lists.sourceforge.net/lists/listinfo/jboss-user



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to