I'm not sure if this counts as a feature request or bug. From a cursory
look at the Django source it seems that this functionality may not be
compatible with the way Django handles lookups outside of .filter().
--
Ticket URL: <https://code.djangoproject.com/ticket/23709>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Old description:
> ArrayField allows lookups by index when filtering, e.g.
> {{{
> qset.filter(arr__0=foo)
> }}}
> but things like
> {{{
> qset.values('arr__0')
> qset.aggregate(Max('arr__0')
> }}}
> are not allowed.
>
> I'm not sure if this counts as a feature request or bug. From a cursory
> look at the Django source it seems that this functionality may not be
> compatible with the way Django handles lookups outside of .filter().
New description:
ArrayField allows lookups by index when filtering, e.g.
{{{
qset.filter(arr__0=foo)
}}}
but things like
{{{
qset.values('arr__0')
qset.aggregate(Max('arr__0'))
}}}
are not allowed.
I'm not sure if this counts as a feature request or bug. From a cursory
look at the Django source it seems that this functionality may not be
compatible with the way Django handles lookups outside of .filter().
--
--
Ticket URL: <https://code.djangoproject.com/ticket/23709#comment:1>
* stage: Unreviewed => Accepted
Comment:
This is something that we want to allow, but we just haven't gotten there
yet.
--
Ticket URL: <https://code.djangoproject.com/ticket/23709#comment:2>
* type: Uncategorized => New feature
--
Ticket URL: <https://code.djangoproject.com/ticket/23709#comment:3>
* status: new => closed
* resolution: => duplicate
Comment:
Closing as a duplicate of https://code.djangoproject.com/ticket/24747
--
Ticket URL: <https://code.djangoproject.com/ticket/23709#comment:4>