Thursday, August 1, 2013

Re: Ordering a queryset on a reverse foreign key's attribute

On Thu, Aug 1, 2013, Simon Charette <charette.s@gmail.com> wrote:

>>From a quick look I'd also expect `order_by('-children__date')` to work.
>
>Can you provide the generated SQL query and some results?

I have in fact raised a ticket about this <https://code.djangoproject.com/ticket/20842> which shows the generated sequel and describes the issue in more detail.

Maybe this is just a limitation of the ORM and should be noted more clearly in the documentation, or maybe it's behaviour that could be improved.

Daniele

--
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate