Opened 18 years ago
Closed 18 years ago
#3050 closed enhancement (fixed)
[patch] enable values() even with extra(select=...)
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | |
Severity: | normal | Keywords: | values extra |
Cc: | Honza.Kral@… | Triage Stage: | Accepted |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It is impossible to use values() function if you are using custom fields via extra( select=.. ), this patch changes that
example:
Article.objects.extra( select={'id_plus_one' : 'id + 1'} ).values('id', 'id_plus_one')
The patch doesn't break existing functionality (all tests passed) and adds tests for this feature.
Attachments (2)
Change History (7)
by , 18 years ago
Attachment: | values.diff added |
---|
comment:1 by , 18 years ago
I found an older ticket about this issue: #532, it was closed as invalid (for reasons that doesn't apply to this patch)
comment:2 by , 18 years ago
Summary: | enable values() even with extra(select=...) → [patch] enable values() even with extra(select=...) |
---|
comment:3 by , 18 years ago
Cc: | added |
---|
comment:4 by , 18 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:5 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
patch implementing the feature