#29429: Postgres ArrayField doesn't work properly.
-------------------------------------+-------------------------------------
Reporter: | Owner: nobody
creative3000 |
Type: Bug | Status: new
Component: Database | Version: 2.0
layer (models, ORM) | Keywords: db orm ArrayField
Severity: Normal | postgres
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
When you filter by len like in documentation example:
Post.objects.filter(tags__len=1)
But if you try to annotate something an error pops up example:
Post.objects.all().annotate(tag_len=F('tags__len'))
It really seems that it should work by default, but instead I needed to
use something like this
Post.objects.all().annotate(tag_len=Func(F('tags'), 1,
function='array_length'))
--
Ticket URL: <https://code.djangoproject.com/ticket/29429>
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/055.9f045bf865dd7cc157b63166cff8579e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.