Another solution could be to inverse the order:
- first delete the parent (so the rule RESTRICT is immediately fired)
- second set null the FKs.
On 8 sep, 19:52, Michael Bayer [EMAIL PROTECTED] wrote:
On Sep 8, 2007, at 12:54 PM, Jean-Philippe Dutreve wrote:
My need is related to
On Sep 9, 2007, at 5:09 AM, Jean-Philippe Dutreve wrote:
Another solution could be to inverse the order:
- first delete the parent (so the rule RESTRICT is immediately fired)
- second set null the FKs.
that would *really* add complexity to the core code just to support
this feature.
On Sep 9, 2007, at 5:09 AM, Jean-Philippe Dutreve wrote:
Another solution could be to inverse the order:
- first delete the parent (so the rule RESTRICT is immediately fired)
- second set null the FKs.
hm, except that RESTRICT is the same as the default of NO ACTION.
The feature is added
On Sep 9, 2007, at 12:21 PM, Jean-Philippe Dutreve wrote:
I prefer put constraints in database rather than in application/
framework because several applications can access
the same database and applications can gone quicker than DB.
The ORM doesnt get in the way of your placing appropriate
On Sep 8, 2007, at 12:54 PM, Jean-Philippe Dutreve wrote:
My need is related to Postgresql ON DELETE RESTRICT/NO ACTION : I'd
want a sql exception as soon as a parent having any existing child is
deleted. I don't want cascade delete on children, just the parent but
only if it has no child.