#7666 closed (fixed)
Default managers should not restrict access to single related objects
Reported by: | jkocherhans | Owned by: | Jacob |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
We currently use the default manager when looking up a single related object, but this can make the related object inaccessible. See the attached test for details.
Attachments (2)
Change History (11)
comment:1 by , 16 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
by , 16 years ago
Attachment: | 7666-failing-test.diff added |
---|
by , 16 years ago
Attachment: | 7666.patch added |
---|
comment:2 by , 16 years ago
comment:3 by , 16 years ago
Has patch: | set |
---|
Simple patch; does not address Ivan Sagalaev's concerns in the django-dev thread.
comment:4 by , 16 years ago
Triage Stage: | Design decision needed → Accepted |
---|
Changed to accepted based on previous comments on django-dev.
For reference: http://groups.google.com/group/django-developers/browse_thread/thread/619f44e1ae68da1a/c94c12f5db53c1a1
comment:5 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:6 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:7 by , 16 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Yikes guys
this change, effectively kills "get" overloading in Managers
i can think of a million reasons way this is necessary,
caching these 'gets' in some local/thread/memcached world
'special gets' (deleted flags and permissions)
database sharding, etc, etc
i hope y'all re think this before Versions 1, so i'm reopening this as since the 'QuerySet' approach you took has no ability to be overloaded
comment:8 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
The problem described in the ticket is fixed, please create a new ticket for the new problem.
Simple patch; does not address Ivan Sagalaev's concerns in the django-dev thread.