Opened 19 years ago
Last modified 18 years ago
#452 closed defect
M2MField doesn't work. — at Initial Version
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Metasystem | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I create two m2mfields which reference to the same class, such as this:
class Name(Model):
name = CharField (maxlength=50)
def repr(self):
return self.name
class People(Model):
first_name = ManyToManyField (Name)
last_name = ManyToManyField (Name)
def repr(self):
return self.first_name
I get two tables in DB:
app_peoples_first_name and app_peoples_last_name:
And i also get three apis:
set_first_name, set_last_name and get_name_list.
while i think there should be two gets here: get_first_name_list and
get_last_name_list.