Q:

Repository query->setLimit(4) returns no result in some cases

In my Repository for an extentsion I have the following code:
function findByTyp($typ, $not, $gender) {
         $query = $this->createQuery();
         return $query->matching(
                        $query->logicalAnd(
                            $query->equals('pid', 96),
                            $query->equals('typ', $typ),
                            $query->logicalNot($query->equals('uid', $not)),
                            $query->equals('gender', $gender)
                        )
                    )
                    ->setOrderings (Array('sort' => \TYPO3\CMS\Extbase\Persistence\QueryInterface::ORDER_ASCENDING))
                    ->setLimit(4)
                    ->execute();
    }

Now in a specific case this should return a query with 1 item in it. But somehow it does not return any item. But when I remove ->setLimit(4) it returns the right item. 
Now this makes not much sense to me. As in other cases it works how it should. So how can ->setLimit(4) remove items from the query when there are no more then 4 items (in this case just 1)

A:

I couldnt find an answer so far so here is my
Workaround:
I dont use ->setLimit(4) in the Repository, but only use the first 4 items in the template:
<f:for each="{collection}" as="collectionItem" iteration="collectionCount">
        <f:if condition="{collectionCount.index}<4">
              ....
        </f:if>
    </f:for>

