﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
327	Metasystem should support more than one ManyToMany relationship	upadhyay@…	Adrian Holovaty	"with the following model:
{{{
#!python
class User(meta.Model):
    fields = (
        meta.CharField('email', maxlength=200),
    )

class Book(meta.Model):
    fields = (
        meta.CharField('title', maxlength=200),
        meta.ManyToManyField(User, rel_name=""owner"", related_name=""owns""),
        meta.ManyToManyField(User, rel_name=""seeker"", related_name=""seeks""),
    )
}}}
I am getting only one relation exposed in the generated api:
{{{
#!python
>>> from django.models.testmany import *
>>> u = users.User(email=""asd"")
>>> dir(u)
['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__getattribute__'
, '__hash__', '__init__', '__metaclass__', '__module__', '__new__', '__reduce__'
, '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', '_meta',
 'delete', 'email', 'get_owns', 'get_owns_count', 'get_owns_list', 'id', 'save',
 'set_books']
>>>
}}}
also book gets APIs for getting books ""owner"" and ""seeker"" relationships, but there is no corresponding ""set_owners"" and ""set_seekers"" functions, only a set_users:
{{{
#!python
>>> b = books.Book(title=""asdads"")
>>> dir(b)
['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__getattribute__'
, '__hash__', '__init__', '__metaclass__', '__module__', '__new__', '__reduce__'
, '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__weakref__', '_meta',
 'delete', 'get_owner_list', 'get_seeker_list', 'id', 'save', 'set_users', 'titl
e']
>>>
}}}
I am using Python 2.3, latest django from SVN."	defect	closed	Metasystem		normal	fixed			Unreviewed	0	0	0	0	0	0
