Opened 19 years ago

Closed 18 years ago

Last modified 17 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: 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 Adrian Holovaty, 18 years ago

Resolution: invalid
Status: newclosed

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

comment:2 by James Bennett <ubernostrum@…>, 18 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.

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

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

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