[11:03] lukasz: reading https://docs.djangoproject.com/en/dev/topics/db/queries/#spanning-multi-valued-relationships [11:03] What would you expect Blog.objects.exclude(entry__headline__contains='Lennon', entry__pub_date__year=2008) to do, and why? [11:08] noodles775: exclude blog objects which have associated entry (headline~='Lenon' & year(pub_date)=2008) [11:09] lukasz: that's what I would expect too, but this django test fails http://paste.ubuntu.com/754721/ [11:09] noodles775: as ',' in exclude is (should be) translated to AND [11:09] with [11:10] http://paste.ubuntu.com/754723/ [11:11] If you agree, I'll submit a django ticket. [11:13] noodles775: that's the last assert in test? [11:14] lukasz: yep - it's the same problem that danny was seeing in his branch when trying my suggested query. [11:16] noodles775: I think it works as expected, as you have: SELECT ... WHERE NOT ((article.headline = 'Article_ with underscore) AND (article.pub_date < '2006-01-01')) [11:17] lukasz: the SQL is doing that, yes, but that wasn't what you expected above was it? (or what did I miss?) [11:17] or am I confused :/ [11:18] noodles775: but then, how would you write SQL for the expected behaviour? [11:19] lukasz: Not sure I would, but I wouldn't advertise it as doing the expected behaviour. [11:23] noodles775: maybe submit a ticket and see what django devs think about it [11:23] lukasz: yeah, doing so now. [11:24] although changing that behaviour would be a big, incompatible change [11:24] updating the documentation would work. [11:24] ah, right [11:25] * noodles775 checks the query for the filter too [11:25] .exclude(a, b) == .filter(Q(~Q(a) | ~Q(b))) [11:26] This is the exclude query (formatted): http://paste.ubuntu.com/754738/ [11:28] LIMIT 21? [11:28] No idea whyh the limit is 21 [11:30] Filter and exclude together: http://paste.ubuntu.com/754742/ [11:35] ok, that's interesting [11:37] Yeah, the exclude is "Show me all authors who have not published an article with underscore and have not published an article before 2006", which is [], but not what was intended, I think. [11:57] lukasz: I botched the formatting, but here's the bug fwiw: https://code.djangoproject.com/ticket/17315 [11:57] Django bug 17315 in Database layer (models, ORM) ".exclude(a, b) does not operate on a single related record" [Normal,New] [12:21] https://code.launchpad.net/~jml/pkgme-service/end-to-end-pkgme/+merge/83624 finally ready for review [16:24] Can I get a review of that branch please? [16:24] https://code.launchpad.net/~jml/pkgme-service/end-to-end-pkgme/+merge/83624 [16:27] jml: if it's not done when you start tomorrow, ping me and I'd be happy to go through it with you. [16:43] noodles775: thanks.