Opened 16 years ago
Closed 16 years ago
#10037 closed (wontfix)
id column is created in ManyToMany link (relation) table
Reported by: | Evgeniy Ivanov | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Keywords: | ManyToManyField | |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description
When I use ManyToManyField, extra id field is created for link (relation) table. It's done in sql_for_many_to_many_field() function.
I didn't find any comment in the source code or anything in the docs/google, so it might be a bug rather than intentional behavior.
Attachments (1)
Change History (5)
by , 16 years ago
comment:1 by , 16 years ago
There is one more place there, where id is used and I didn't fix that. Nnow I see that it might be done intentionally.
Wayting for responce.
comment:2 by , 16 years ago
Patch needs improvement: | set |
---|
comment:3 by , 16 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:4 by , 16 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
This isn't a bug, in that it's intentional behaviour. Removing it would at least be backwards incompatible.
A proposal to add an API to not create that column might be interesting to discuss (in the Django 1.2 timeframe, most likely). Start a thread on django-dev when proposals are discussed for Django 1.2 if you can think of an API. Also, have a check in the ticket system -- I have a feeling there might already be a ticket open about such an API (or, at least, a discussion on the mailing lists).
Not worth removing at this time, however.
patch