Looking for someone to check into this, before i submit problem is with __isnull=False handling
backend is psycopg2 tables: class Person(models.Model): name = models.CharField(max_length=60) surname = models.CharField(max_length=60) class SampleTest(models.Model): person = models.OneToOneField(Person,primary_key=True) entry_date = models.DateField() from django.db import connection Person.objects.filter(sampletest__isnull=True)[0] print connection.queries [SQL OK] Person.objects.filter(sampletest__isnull=False)[0] print connection.queries now note that person table doesnt even try to join sampletest table ... Person.objects.filter(sampletest__isnull=False)[0].sampletest throws DoesNotExist exception -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.