[TYPO3-mvc] RFC #9772: Union Statement on comma separated lists doesn't respect records with only one assigned child record

Marc Bastian Heinrichs typo3 at mbh-web.de
Thu Jan 20 17:38:50 CET 2011


Hi list,

This is an SVN patch request.

Type: Bug

Bugtracker reference:
http://forge.typo3.org/issues/9772

Branches:
trunk

Problem:
If you have a field 'groups' with storing related record uids
as comma separated lists, the following query
$query = $this->createQuery();
$constraint = $query->in('groups.uid', $groups)
$query->matching($constraint);
$teasers = $query->execute();
doesn't find records with only one related record.

Solution:
Use FIND_IN_SET.
TYPO3 4.5 use this native for all queries on fields with comma separated
list, because of performance improvements.


Regards,
Marc Bastian
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 9772_Typo3DbBackend.patch
URL: <http://lists.typo3.org/pipermail/typo3-project-typo3v4mvc/attachments/20110120/02e4b565/attachment-0001.asc>


More information about the TYPO3-project-typo3v4mvc mailing list