protected function targetConditions()
{
if ($this->_targetConditions !== null) {
return $this->_targetConditions;
}
$conditions = $this->conditions();
if (!is_array($conditions)) {
return $conditions;
}
$matching = [];
$alias = $this->alias() . '.';
foreach ($conditions as $field => $value) {
if (is_string($field) && strpos($field, $alias) === 0) {
$matching[$field] = $value;
} elseif (is_int($field) || $value instanceof ExpressionInterface) {
$matching[$field] = $value;
}
}
return $this->_targetConditions = $matching;
}