On Mon, Nov 17, 2008 at 2:21 AM, Merrick <[EMAIL PROTECTED]> wrote:
>
> I have two models, links and groups. A Link has an optional foreign
> key Group.
>
> When I delete a Group, Django by default deletes all Links that
> referenced the Group that is being deleted.
>
> How do I avoid the default behavior that does a cascade delete. Of
> course I could use the cursor but would am hoping there is some option
> I don't know of for delete().

Try using clear() prior to deleting:

http://docs.djangoproject.com/en/dev/topics/db/queries/#following-relationships-backward

-- 
---
David Zhou
[EMAIL PROTECTED]

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

Reply via email to