Issue Bug Closed

#80744Extbase\Persistence\Repository IN statement string values in custom queries does not has quotes

Anonymous 04/07/17, 10:27 updated 10/02/18, 11:00

Description

Steps to reproduce

  • Create a custom query with a IN statement
  • Example query on tt_content table
$query->matching(
    $query->logicalAnd([
        $query->in(
            'CType', $CTypes // <- this string values does not has quotes
        ),
        $query->in(
            'pid', $pages
        )
    ])
);

Possible workaround

if (TYPO3_branch === '8.7') {
    $CTypes = array_map(function($a) { return '"'.$a.'"';}, $CTypes);
}

Reviews 1