Re: Deleting with Referential Integrities
Re: Deleting with Referential Integrities
- Subject: Re: Deleting with Referential Integrities
- From: Greg <email@hidden>
- Date: Tue, 28 Jun 2005 09:35:29 +1000
So, Album has a foreign key and a relationship called Icon pointed
to the Image table. If you delete an Image that is an Icon, you get
a crooked result. If you have a relationship Image >> Albums (from
pk in Image to the fk used for the Icon relationship), why don't
you just set the delete rule to nullify (as the inverse
relationship called Icon (Album>Image) is not mandatory)? So, you
are free to delete whatever you like.
Album has a to-One relationship to image via the icon relationship.
It has a to-Many relationship via the images relationship. Image does
not have an inverse relationship for icon, but does for images
(album). Icon is optional with a delete rule of nullify, images is
optional with a delete rule of cascade and owns destination. The
inverse relationship album in Image is mandatory with a delete rule
of no action.
It still doesn't allow it to delete the image that is the icon.
Greg
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden