On Fri, Jul 4, 2014 at 4:42 PM, Jon Dufresne <[email protected]> wrote: > Item.objects.filter(current=True, > container__item__previous__isnull=True, container__item__flag=True) > --- > > That is, I'm looking for all current items such that the first item in > the chain has flag = true. Django 1.6 produces the following SQL for > this query:
what purpose does the "container__item__previous__isnull=True" argument serve here? i think it means "an item that belongs to a container that has an item with no 'previous'", which if it's a linked list, then any non-empty container would comply, and since you start the query from the item, then the container is non-empty by definition. btw, a linked list in a database? can you elaborate on that idea? -- Javier -- You received this message because you are subscribed to the Google Groups "Django developers" 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]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CAFkDaoR6GwBq2r68V7HbHhCnjednpL7GBGA1rpOOeru15Wr_%3DQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
