Opened 15 years ago
Closed 9 years ago
#13793 closed Bug (fixed)
reverse of OneToOne relation should use default manager if use_for_related_fields specified
Reported by: | Shaun Cutts | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.2 |
Severity: | Normal | Keywords: | use_for_related_fields |
Cc: | shaun@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | yes | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
When retrieving the related object in a reverse OneToOne relation, the SingleRelatedObjectDescriptor doesn't respect "use_for_related_fields" if defined by the default manager for the class of the related object. See patch for proposed fix (which indicates the code in question as well).
Attachments (1)
Change History (9)
by , 15 years ago
Attachment: | one_to_one_use_default_manager_if_asked.diff added |
---|
comment:1 by , 15 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 14 years ago
Severity: | → Normal |
---|---|
Type: | → Bug |
comment:3 by , 14 years ago
Needs tests: | set |
---|
comment:6 by , 9 years ago
Keywords: | use_for_related_fields added |
---|
comment:7 by , 9 years ago
PR6175 deprecates use_for_related_fields
. "to-one" relations go through _base_manager
which can be specified with the base_manager_name
model option.
Note:
See TracTickets
for help on using tickets.
patch for SingleRelatedObjectDescriptor