#12641: ManyToMany relationship with self, symmetrical=True,
related_name='something' doesn't work
------------------------------------+---------------------------------------
          Reporter:  hwmrocker      |         Owner:  nobody
            Status:  closed         |     Milestone:        
         Component:  Uncategorized  |       Version:  1.1   
        Resolution:  invalid        |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by russellm):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => invalid
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 That's because a symmetrical m2m with self doesn't use the related_name.

 The reason for this becomes obvious if you look at the data being stored.
 In the case of parent/child, the relationship isn't symmetrical - if A is
 a child of B, it doesn't follow that A is a parent of B.

 In contrast, "friend" is a symmetrical m2m relationship - if I am your
 friend, then you are my friend.

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