Removed empty queries with nullable relationship.

Situation: An entity with nullable one reference. If you find only one entity that has this property is set to null, it generates the empty query.

Example
-------------
```php
$book = new Book;
$book->author = NULL;
$book->title = "The book written by anonym";
$bookRepository->persist($book);

///

$bookRepository->find($book->id);
```


Generates :
```sql
SELECT `file`.* 
FROM `file` 
WHERE `file`.`id` IN (NULL)
```