Hi, I have a question that is probably very simple to answer. class Example(models.Model): value = models.CharField(max_length=200) related_examples = models.ManyToMany ('self',related_name='related_example_set')
If I define a ManyToMany relationship like the one above and I want to access all Example's that are related to a specific Example instance, which of the following methods should I use? 1) related_examples.all() 2) related_examples.all().append(related_example_set.all()) The reason I ask is that it is possible that one instance is assigned a relationship to another instance, but the relationship is not defined in the other direction. E.g. x.add(y) BUT NOT y.add(x) Thanks, Alex --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---