Bug #63275
closed
Typo3DbQueryParser generates broken SQL for array in CONTAINS-comparison
Added by Stefan Neufeind almost 10 years ago.
Updated almost 10 years ago.
Description
When passing an array for a "contains"-comparison Typo3DbQueryParser generates SQL like:
[...] FROM sys_category_record_mm WHERE uid_local='1','3' AND tablenames = [...]
which simply needs an "IN" statement for the operand2.
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34514
- TYPO3 Version changed from 7 to 6.2
Example-code to test with:
public function listAction() {
$catA = $this->categoryRepository->findByTitle('CatA')->getFirst();
$catC = $this->categoryRepository->findByTitle('CatC')->getFirst();
$query = $this->myrecordRepository->createQuery();
$myrecords = $query->matching(
$query->contains('categories', array($catA->getUid(), $catC->getUid()))
)->execute();
$this->view->assign('myrecords', $myrecords);
}
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34514
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34514
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34514
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/34514
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35646
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Under Review
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35646
- Status changed from Under Review to Closed
This is a duplicate of #7848
Discussion should continue there
Also available in: Atom
PDF