Project

General

Profile

Actions

Bug #63275

closed

Typo3DbQueryParser generates broken SQL for array in CONTAINS-comparison

Added by Stefan Neufeind over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Should have
Category:
Extbase
Target version:
-
Start date:
2014-11-23
Due date:
% Done:

100%

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

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #64044: Revert fix for #63275 until concept is worked out and agreed uponClosed2014-12-26

Actions
Is duplicate of TYPO3 Core - Feature #7848: Support array / multiple values in $query->containsClosed2010-05-212010-06-04

Actions
Actions #1

Updated by Gerrit Code Review over 9 years ago

  • 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

Actions #2

Updated by Stefan Neufeind over 9 years ago

  • 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);
}

Actions #3

Updated by Gerrit Code Review over 9 years ago

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

Actions #4

Updated by Gerrit Code Review over 9 years ago

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

Actions #5

Updated by Gerrit Code Review over 9 years ago

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

Actions #6

Updated by Gerrit Code Review over 9 years ago

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

Actions #7

Updated by Gerrit Code Review over 9 years ago

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

Actions #8

Updated by Stefan Neufeind over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #9

Updated by Gerrit Code Review over 9 years ago

  • 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

Actions #10

Updated by Helmut Hummel over 9 years ago

  • Status changed from Under Review to Closed

This is a duplicate of #7848

Discussion should continue there

Actions

Also available in: Atom PDF