#1007: [patch] Add support for a faux ON DELETE RESTRICT functionality
--------------------------+-------------------------------------------------
   Reporter:  bitprophet  |                Owner:  adrian          
     Status:  new         |            Component:  Database wrapper
    Version:              |           Resolution:                  
   Keywords:              |                Stage:  Accepted        
  Has_patch:  1           |           Needs_docs:  1               
Needs_tests:  1           |   Needs_better_patch:  1               
--------------------------+-------------------------------------------------
Comment (by Jeff Forcier <[EMAIL PROTECTED]>):

 Re: recently attached patch: since things appeared to be re-jiggered a
 fair amount in the move from 0.91 to 0.95 (in the deletion mechanisms,
 that is) I had to re-examine my old patch and redo it. The end result
 should be exactly the same, but it gets there in a more efficient manner
 now - it just does an check during the iteration in
 {{{_collect_sub_objects()}}} to see if the current related object is set
 to follow or not, and triggers the 'RESTRICT'-like behavior if so.
 
 No mucking with sets or calling {{{get_related_many_to_many_objects()}}}
 prematurely seems to be necessary--or rather, I realized that it was okay
 to delete items if they have M2M relationships, since those don't appear
 to trigger the CASCADE-like behavior evidenced with more direct
 relationships like FKs. Don't remember if that was different back in 0.91.
 
 I just noticed I neglected to add the extra Exception subclass, so I will
 overwrite the new diff with that included. Since I have no test-fu I will
 also try and take a whack at that in the near future - learning is good.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/1007#comment:14>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to