My case is the follwing :
In a range of dates, I want to know if an entity has been defined for each day. So the raw SQL result would looks like :
The range calculation forced me to use Native Query, but I stumbled upon a strange behavior : the Result array showed less records than the raw SQL would provide. After some dirty debugging, I found out that during hydration, an array of previously hydrated object keys was stored ObjectHydrator->_identifierMap. The key of null elements (the gap in the SQL result above) is stored too. The problem is that when there is multiple empty elements, hydration only keeps one, and forget the others, thus reducing the overall size of the output result.
I've already come up with a quick n'dirty fix wich suits my current needs, but it would be better if this issue was addressed at a more global level.
Here's the one-liner fix :