#7689: add 'symmetrical' argument to OneToOneField('self')
-------------------------------------+--------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  nobody    
   Status:  new                      |   Milestone:            
Component:  Core framework           |     Version:  SVN       
 Keywords:                           |       Stage:  Unreviewed
Has_patch:  0                        |  
-------------------------------------+--------------------------------------
 I would like to see a new feature on one-to-one relationship.
 It would be good if OneToOneField had a 'symmetrical' argument to make
 this relationship bidirectional.
 This could be available only for self one-to-one relationships.
 An example model :

 {{{
 class Person(models.Model):
         name=models.CharField(max_length=100)
         spouse=models.OneToOneField('self',symmetrical=True)
         best_friend=models.OneToOneField('self',symmetrical=False)
 }}}



 John is necessarily his spouse's spouse but he may not be his best
 friend's best friend.
 The same feature has already been added to many-to-many relationships.
 Thanks to Django developers.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/7689>
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