Opened 13 years ago

Closed 12 years ago

Last modified 11 years ago

#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: UI/UX:


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 Changed 12 years ago by Adrian Holovaty

Resolution: invalid
Status: newclosed

Closing this because we no longer have get_values() after magic-removal.

comment:2 Changed 12 years ago by James Bennett <ubernostrum@…>

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.

comment:3 Changed 12 years ago by Honza Král <Honza.Kral@…>

Ooops, I just opened a new ticket for this (patch included)
see #3050

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