Thank you for answering Karen and Luke.
I didn't recognize the "first update and then delete" thing as a
safety method.

Hopefully future versions of django will have mechanics to handle the
on delete behaviour.

Still it is hard to belief, that you have less problems with auto-
deleting of relations than you
would have with auto-nulling. Predelete-Signals would be a sufficient
mechanic to
accomplish a on delete cascade. On the other hand its quite
complicated to overwrite the delete of
django.contrib models e.g. if you have a foreignkey to the user model.

> class Employee(Model):
>    boss = ForeignKey('self', null=True)
>
> The semantics of this model might include the idea that employees with
> boss == NULL are directors.  Now, if we delete employee e1 who happens
> to be the boss of employee e2, and just null out e2.boss, we have
> promoted e2 to being a director, which is not intended.
>
I favor a wrong assinged employee over a flushed table. I think thats
what happens if you
delete the (single) director.

> Hope that explains it, sorry if the message was rather brief, but this
> has come up several times before and we can't explain it every time.

I can only imagine how often you need to repeat your selfs. And I
appreciate your patience
very much.

best regards
 -kanu

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to