public function build()
{
$query = $this->qb;
if ($this->getWhereExpression()) {
$query->where($this->getWhereExpression());
}
foreach ($this->getWhereParameters() as $key => $param) {
$query->setParameter($key, $param, is_array($param) ? Connection::PARAM_STR_ARRAY : null);
}
return $query;
}