﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
25972	Filtering a ForeignObject with 'isnull' lookup fails in Django 1.9	Tomo Otsuka	nobody	"Introduced by this PR: https://github.com/django/django/pull/4036

For example, with the following models:
{{{
from django.db import models
class Author(models.Model):
    id = models.IntegerField()
    name = models.CharField()
    class Meta:
        app_label = 'foo'

class Book(models.Model):
    author_id = models.IntegerField()
    author_name = models.CharField()
    author = models.ForeignObject(Author, models.CASCADE, ['author_id', 'author_name'], ['id', 'name'])
    class Meta:
        app_label = 'foo'
}}}
Running the following filter:

`Book.objects.filter(author__isnull=True).query.__str__()`

Will result in:
{{{
AttributeError: 'MultiColSource' object has no attribute 'as_sql'
> .../django/db/models/sql/compiler.py(366)compile()
    365         else:
--> 366             sql, params = node.as_sql(self, self.connection)
    367         if select_format and not self.subquery:
}}}"	Bug	closed	Database layer (models, ORM)	1.9	Release blocker	fixed	ForeignObject		Accepted	1	0	0	0	0	0
