I've run into a problem with mutliple ManyToMany fields with the same
model.  Only one set of the get_*_list() methods show up pointing
backwards:

class Group(meta.Model):
    owners = meta.ManyToManyField( User, singular='owner',
related_name='ownerof')
    members = meta.ManyToManyField(User, singular='member',
related_name='memberof')

With this model, I get a User.get_ownerof_list() method but not a
User.get_memberof_list()

However, if I flip the ordering:

class Group(meta.Model):
    members = meta.ManyToManyField(User, singular='member',
related_name='memberof')
    owners = meta.ManyToManyField( User, singular='owner',
related_name='ownerof')

Now I get a User.get_memberof_list() but not a User.get_ownerof_list()

It seems like the model can only handle one ManyToManyField to a given
model.  This looks like a bug to me.  Has anyone seen this before?  Is
there a workaround?

Paul

Reply via email to