Re: ticket 10032, joins and isnull=True

2009-05-11 Thread Gábor Farkas
On Mon, May 11, 2009 at 6:22 PM, Malcolm Tredinnick wrote: > The choice to be made in an API implementation of this kind is whether > NULL checks on fields in related models implies a related instance > exists or not. Django follows SQL there and doesn't insist that a > related row exists: absenc

Re: ticket 10032, joins and isnull=True

2009-05-11 Thread Malcolm Tredinnick
On Mon, 2009-05-11 at 16:27 +0200, Michael Radziej wrote: > On Mon, May 11, Gábor Farkas wrote: > > > > > but that's not the case here. the nullable field i have here is a > > DateTimeField. > > > > we are talking about this sql: > > > > SELECT "x_group"."id", "x_group"."name" > > FROM "x_gro

Re: ticket 10032, joins and isnull=True

2009-05-11 Thread Michael Radziej
On Mon, May 11, Gábor Farkas wrote: > > but that's not the case here. the nullable field i have here is a > DateTimeField. > > we are talking about this sql: > > SELECT "x_group"."id", "x_group"."name" > FROM "x_group" LEFT OUTER JOIN "x_person" > ON ("x_group"."id" = "x_person"."group_id") >

Re: ticket 10032, joins and isnull=True

2009-05-11 Thread Gábor Farkas
On Mon, May 11, 2009 at 11:37 AM, Michael Radziej wrote: > > On Mon, May 11, Gábor Farkas wrote: > >> Group.objects.filter(person__stamp__isnull=True) >> >> i get an OUTER JOIN, >> >> but if i do this: >> >> Group.objects.filter(person__stamp='2008-12-12') >> >> i get an INNER JOIN. >> >> please

Re: ticket 10032, joins and isnull=True

2009-05-11 Thread Michael Radziej
On Mon, May 11, Gábor Farkas wrote: > i'd like to discuss ticket 10032, because it was closed as WONTFIX, > ... > Group.objects.filter(person__stamp__isnull=True) > > i get an OUTER JOIN, > > but if i do this: > > Group.objects.filter(person__stamp='2008-12-12') > > i get an INNER JOIN. > >

ticket 10032, joins and isnull=True

2009-05-11 Thread Gábor Farkas
hi, i'd like to discuss ticket 10032, because it was closed as WONTFIX, and i think the issue i raised was somehow misundersood, perhaps i explained it the wrong way. the problem is that i'm filtering a queryset by doing a join using a foreign-key in the "opposite way", and django sometimes does