On Aug 13, 9:30 am, Russell Keith-Magee <freakboy3...@gmail.com>
wrote:
> On Thu, Aug 13, 2009 at 12:04 AM, Michael Glassford<glassfo...@gmail.com> 
> wrote:
>
> Secondly: I'm sensitive to the extent that 'on delete cascade' et al
> are phrased in SQL specific terms. I fully acknowledge the use case -
> what happens to a FK when the object it points to is deleted - but I
> want to make sure that we phrase it in a way that makes sense with
> non-SQL backends. Have you had any thoughts about this?

Maybe using the UML terms to declare these associations, as it makes
sense in an ORM environment, and is not SQL specific.

ForeignKey(composition=True)
Strong association -> relates to SQL's CASCADE or similar behavior on
custom backends

ForeignKey(aggregation=True)
Weak association -> relates to SQL's SET_NULL or similar behavior on
custom backends

ForeignKey(restrict=True)
Optional restrict to raise Exception on delete -> relates to SQL's
RESTRICT


As a side note, I'm 100% in favor for a way of defining the on_delete
behavior at field declaration.

> Yours
> Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to