Hi,
I have a model which looks like:

class Person(models.Model):
    friends = models.ManyToManyField("self", through="Friendship")

class Friendship(models.Model):
   person_a = models.ForeignKey(Person)
   person_b = models.ForeignKey(Person, related_name="_unused_")

Now, as mentioned in:

http://docs.djangoproject.com/en/dev/topics/db/models/#intermediary-manytomany

For this to work, you also /have/ to use symmetrical=False in the
ManyToManyField, but frankly I don't understand why.
Do you have an explanation?
Thank you!

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to