#63043All result returned instead of none
Description
Function I use in my repository to fetch entries:
public function findByZip($zip, $training = 'all', $state = 0) {
$query = $this->createQuery();
$where = $query->equals('zip', $zip);
$where = $query->equals('show_profile', 1);
$query->matching($where);
$query->setOrderings(array('address' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING));
$result = $query->execute(TRUE);
print_r($result); die;
return $result;
}
In my case there is ony one result with this zip, but it has show_profile set to 0. So the result should be 0 entries. But all entries are returned – does not matter if I fetch raw result or as objects. If I comment the line where I check for show_profile, then only one entry is returned – this is the right behaviour.
To sum it up: In case on an empty result all entries are returned.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.