Add support for using indexes in update() for ArrayFields.
Django supports index lookup for ArrayField
s (see docs). I think we should support them also in update()
, e.g.
Foo.objects.update(bar_array_field__0='random text')
Foo.objects.update(bar_array_field__0=F('other_related_field'))
I know that 3rd party packages already support this e.g. django_postgres_extensions, but IMO we should add this to Django.
Change History
(9)
Triage Stage: |
Unreviewed → Accepted
|
Owner: |
set to Nasir Hussain
|
Status: |
new → assigned
|
Patch needs improvement: |
set
|
Has patch: |
unset
|
Owner: |
changed from Nasir Hussain to Abhyudai
|
Patch needs improvement: |
unset
|
Owner: |
Abhyudai removed
|
Status: |
assigned → new
|
Cc: |
Ülgen Sarıkavak added
|
OK. Seems reasonable.