#9023: OneToOneField delete() problem
---------------------------------------------------+------------------------
          Reporter:  TheShark                      |         Owner:  juriejan   
                 
            Status:  new                           |     Milestone:  1.1        
                 
         Component:  Database layer (models, ORM)  |       Version:  1.0        
                 
        Resolution:                                |      Keywords:  
OneToOneField delete cascade
             Stage:  Accepted                      |     Has_patch:  1          
                 
        Needs_docs:  0                             |   Needs_tests:  1          
                 
Needs_better_patch:  1                             |  
---------------------------------------------------+------------------------
Changes (by juriejan):

 * cc: [email protected], [email protected], [email protected],
 [email protected], [email protected], [email protected], [email protected],
 [email protected], [email protected], [email protected],
 [email protected], [email protected], to, [email protected],
 [email protected], [email protected], [email protected],
 [email protected], [email protected], [email protected],
 [email protected] (added)
  * needs_better_patch:  0 => 1
  * has_patch:  0 => 1
  * owner:  nobody => juriejan
  * needs_tests:  0 => 1

Comment:

 I've created a sloppy patch to fix this issue. It's my first whack at
 working on the DB layer (or making a serious contribution) so please bear
 with me.

 I figured that we need a reference to the SingleRelatedObjectDescriptor
 that is related to the ReverseSingleRelatedObjectDescriptor for the
 OnToOne field so that we can access it from the '__set__' method of the
 ReverseSingleRelatedObjectDescriptor to remove the cache from the object
 that the relation previously pointed to. So I added the
 'related_object_descriptor' attribute to the RelatedField object. Not sure
 if I should rather add the attribute in a more appropriate place, like in
 RelatedObject or ReverseSingleRelatedObjectDescriptor itself.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/9023#comment:3>
Django <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