Re: Deleting an object on the other side of a has_a

[prev] [thread] [next] [Date index for 2004/09/01]

From: Perrin Harkins
Subject: Re: Deleting an object on the other side of a has_a
Date: 16:33 on 01 Sep 2004
On Wed, 2004-09-01 at 12:15, William McKee wrote:
> Where would the cascading delete go if you wanted to remove b but not a?

I was referring to automatically deleting b when you remove the
relationship from a.  It could be an after_update trigger.

> It seems that CDBI is not fully supporting removal of child(?) objects
> in a relationship. Perhaps, it would be better to reload a after
> deleting b? It seems that CDBI should handle that in the background, no?

Well, deleting object b while object a still references it is a bug in
your code.  You aren't supposed to do that, and databases with
referential integrity checks won't allow you to.

- Perrin

(message missing)

Deleting an object on the other side of a has_a
Peter Pimley 10:02 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 16:09 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 15:32 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 16:33 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 17:03 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 16:42 on 01 Sep 2004

Re: Deleting an object on the other side of a has_a
Perrin Harkins 15:06 on 02 Sep 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52