Actions
Bug #65657
closed[Query Extbase] LogicalAnd -> Equals and In
Status:
Closed
Priority:
Should have
Assignee:
TYPO3 Release Team
Category:
Extbase
Target version:
-
Start date:
2015-03-10
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.5
Tags:
Complexity:
nightmare
Is Regression:
No
Sprint Focus:
Description
Grettings,
We experienced a bug when using the QueryInterface :
This is how we do it :
in a repository:
$query = $this->createQuery(); $matching[] = $query->in(‘Relation1', $valOfRelation1); // contains list of values ‘1111,2222,3333' $matching[] = $query->equals(‘Relation2', $valOfRelation2); // coutains one value ‘0404' $query->matching($query->logicalAnd($matching)); return $query->execute();
return this in SQL
WHERE (1<>1 AND MyTableRelation.Relation2 = '0404')
So the $query->in is gone.
When doing this :
$query = $this->createQuery(); $matching[] = $query->equals(‘Relation2', $valOfRelation2); // coutains one value ‘0404' $matching[] = $query->in(‘Relation1', $valOfRelation1); // contains list of values ‘1111,2222,3333' $query->matching($query->logicalAnd($matching)); return $query->execute();
The result is :
WHERE (MyTableRelation.Relation2 = '0404' AND MyTableRelation.Relation1 IN ('101311','101312','101313','101314','101315','101316','101391','101399'))
We think there is a bug in the $query->logincalAnd with in / equals.
Actions