tickets: 129
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
129 | 2005-07-21 00:02:52 | 2007-07-03 23:04:03 | 2022-03-06 03:19:49.437010 | Accepted | closed | Metasystem | defect | normal | fixed | Multiple ManyToManyField fields with same "to" reference tries to create duplicate tables | Revsion 257 added support for adding multiple !ManyToManyField fields with the same "to" class on the same class. I've tried adding two fields where one has an explicit rel_name option but running "django-admin.py sql myapp" is showing two CREATE TABLE statements with the same table name. I think I've tracked the problem down to the get_m2m_db_table method in the !ManyToManyField class in core/meta.py but I don't understand the code base enough yet to try to fix it. It looks like the code is returning the name as myapp_fromname_toname but I'd expect the name of the many-to-many table to be myapp_relname when the rel_name option is specified. I'm using the MySQL database engine but I don't think that has any bearing on this problem. | adrian | jason@diamond.name | 0 | 0 | 0 | 0 | 0 | 0 |