我正在为DQL
函数编写In(array $array)
。
以下是给出错误的代码
错误:预期=,<,<=,<>,>,> =,!= 文件中的“ IN” /vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php在线 54
public function in(array $array)
{
$parameterName = $this->generateUniqueId();
$dql = "(CASE WHEN {$this->joinAlias}.id > 0 THEN";
$dql .= " {$this->getColumn()} ELSE {$this->joinAlias}_default.value END) IN (:{$parameterName})";
return $this->rawDQL(
$dql,
[
$parameterName => $array
]
);
}