#532 closed defect (invalid)
get_values doesn't work with the "select" lookup
| Reported by: | Jacob | Owned by: | Jacob |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
You should be able to do:
stories.get_values(fields=['pub_date', 'foo'], select={'foo':'SELECT COUNT(*) FROM auth_users'})
But that fails with a FieldDoesNotExist: 'foo' exception.
Change History (3)
comment:1 by , 19 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
comment:2 by , 19 years ago
Adrian, we do have values and extra, though, which provide the same feature.
If someone can replicate this behavior on current trunk by doing something like
Story.objects.values(fields=['pub_date', 'foo']).extra(select={'foo': 'SELECT COUNT(*) FROM auth_users'})
this should probably be reopened.
Note:
See TracTickets
for help on using tickets.
Closing this because we no longer have
get_values()after magic-removal.