Friday, August 24, 2018

ArrayAgg ordering not working?

Hi! I'm trying to use an ArrayAgg and order the results in each array. I found this closed ticket which looks like this feature has been created an merged in but when I try doing a query like
Recipe.objects.all().annotate(ingredients_list=ArrayAgg('ingredients__name', ordering='ingredients__id'))
and print out the query it's running it doesn't seem to be attempting to order the ingredients_list. Is there something I'm doing wrong?

Thanks!!
-Maya

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/6d38377c-c017-4626-96d1-9a6c1c9573ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment