Project

General

Profile

Actions

Bug #63043

closed

All result returned instead of none

Added by Natalia Postnikova over 9 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2014-11-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.

Actions

Also available in: Atom PDF