Project

General

Profile

Actions

Bug #65657

closed

[Query Extbase] LogicalAnd -> Equals and In

Added by Amrouche Hamza over 9 years ago. Updated about 3 years ago.

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 #1

Updated by Susanne Moog almost 5 years ago

  • Status changed from New to Needs Feedback

This issue is quite old, is this still reproducible with newer TYPO3 versions?

Actions #2

Updated by Christian Kuhn about 3 years ago

  • Status changed from Needs Feedback to Closed

Hey. I'll close this due to lack of feedback. If the issue persists, please re-open or create a fresh issue.

Actions

Also available in: Atom PDF