#24814: Unable to order_by an ArrayField element.
----------------------------------+-----------------
Reporter: schinckel | Owner:
Type: Uncategorized | Status: new
Component: contrib.postgres | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+-----------------
It seems logical that, given a model Foo, with ArrayField bar, we should
be able to (using the same rules for querying), perform:
Foo.objects.order_by('bar__0')
However, this does not work. Is this something that _should_ be made to
work?
It is possible to perform this query using an OrderBy(RawSQL()) thing, but
that's a bit hard to figure out.
It's worth pointing out that the same limitation applies to Hstore fields,
and will apply to JSON fields.
At the very least, this should perhaps be documented?
--
Ticket URL: <https://code.djangoproject.com/ticket/24814>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.5d3c454662935edf2515b09433c8f85a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.