Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#24432 closed Cleanup/optimization (fixed)

Documentation: M2M through attribute is underspecified

Reported by: Kevin Christopher Henry Owned by: Floris den Hengst
Component: Documentation Version: dev
Severity: Normal Keywords: afraid-to-commit
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

The documentation says that the automatically created through attribute has fields named <containing_model>_id and <other_model>_id.

That can't be true when it is a M2M to self, since containing_model and other_model are the same. A quick test shows that the fields in that case are named from_<model>_id and to_<model>_id. The documentation should cover this case.

Change History (10)

comment:1 by Simon Charette, 10 years ago

Triage Stage: UnreviewedAccepted
Type: BugCleanup/optimization

comment:2 by Daniele Procida, 10 years ago

Keywords: afraid-to-commit added

comment:3 by Oxylo, 10 years ago

Owner: changed from nobody to Oxylo
Status: newassigned

comment:4 by Oxylo, 10 years ago

Owner: Oxylo removed
Status: assignednew

comment:5 by Floris den Hengst, 10 years ago

Owner: set to Floris den Hengst
Status: newassigned

comment:6 by Tim Graham, 10 years ago

Has patch: set

comment:7 by Sasha Romijn, 10 years ago

Triage Stage: AcceptedReady for checkin

Looks good to me!

comment:8 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In b9b8411129efe13642cef1fc6bbfc62bed717352:

Fixed #24432 -- Added docs for ManyToManyFields that reside in and refer to the same model.

comment:9 by Tim Graham <timograham@…>, 10 years ago

In 9853844ed3d3d25954205ce1b53962b57fef3d5e:

[1.8.x] Fixed #24432 -- Added docs for ManyToManyFields that reside in and refer to the same model.

Backport of b9b8411129efe13642cef1fc6bbfc62bed717352 from master

comment:10 by Tim Graham <timograham@…>, 10 years ago

In 7a08c966ac45a77e6a41fc1cfa1bdbca02dcb1ff:

[1.7.x] Fixed #24432 -- Added docs for ManyToManyFields that reside in and refer to the same model.

Backport of b9b8411129efe13642cef1fc6bbfc62bed717352 from master

Note: See TracTickets for help on using tickets.
Back to Top