diff --git a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php index 28cac813e..77a6e32b9 100644 --- a/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php @@ -84,7 +84,7 @@ class BasicEntityPersister */ static private $comparisonMap = array( Comparison::EQ => '= %s', - Comparison::IS => '= %s', + Comparison::IS => 'IS %s', Comparison::NEQ => '!= %s', Comparison::GT => '> %s', Comparison::GTE => '>= %s', diff --git a/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php b/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php index fa1d7530a..f8ec2bb0d 100644 --- a/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php +++ b/tests/Doctrine/Tests/ORM/Persisters/BasicEntityPersisterTypeValueSqlTest.php @@ -88,4 +88,13 @@ class BasicEntityPersisterTypeValueSqlTest extends \Doctrine\Tests\OrmTestCase $this->assertEquals('t0."simple-entity-id" AS simpleentityid1, t0."simple-entity-value" AS simpleentityvalue2', $method->invoke($persister)); } + + /** + * @group DDC-2073 + */ + public function testSelectConditionStatementIsNull() + { + $statement = $this->_persister->getSelectConditionStatementSQL('test', null, array(), Comparison::IS); + $this->assertEquals('test IS ?', $statement); + } }