Add operator to walkComparison output
This commit is contained in:
parent
15c145f3b3
commit
7c28a932ae
@ -259,10 +259,11 @@ class ManyToManyPersister extends AbstractCollectionPersister
|
|||||||
$parameters = $this->expandCriteriaParameters($criteria);
|
$parameters = $this->expandCriteriaParameters($criteria);
|
||||||
|
|
||||||
foreach ($parameters as $parameter) {
|
foreach ($parameters as $parameter) {
|
||||||
list($name, $value) = $parameter;
|
[$name, $value, $operator] = $parameter;
|
||||||
$field = $this->quoteStrategy->getColumnName($name, $targetClass, $this->platform);
|
|
||||||
$whereClauses[] = sprintf('te.%s = ?', $field);
|
$field = $this->quoteStrategy->getColumnName($name, $targetClass, $this->platform);
|
||||||
$params[] = $value;
|
$whereClauses[] = sprintf('te.%s %s ?', $field, $operator);
|
||||||
|
$params[] = $value;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tableName = $this->quoteStrategy->getTableName($targetClass, $this->platform);
|
$tableName = $this->quoteStrategy->getTableName($targetClass, $this->platform);
|
||||||
|
@ -50,9 +50,9 @@ class SqlValueVisitor extends ExpressionVisitor
|
|||||||
*/
|
*/
|
||||||
public function walkComparison(Comparison $comparison)
|
public function walkComparison(Comparison $comparison)
|
||||||
{
|
{
|
||||||
$value = $this->getValueFromComparison($comparison);
|
$value = $this->getValueFromComparison($comparison);
|
||||||
$field = $comparison->getField();
|
$field = $comparison->getField();
|
||||||
$operator = $comparison->getOperator();
|
$operator = $comparison->getOperator();
|
||||||
|
|
||||||
if (($operator === Comparison::EQ || $operator === Comparison::IS) && $value === null) {
|
if (($operator === Comparison::EQ || $operator === Comparison::IS) && $value === null) {
|
||||||
return;
|
return;
|
||||||
@ -61,7 +61,7 @@ class SqlValueVisitor extends ExpressionVisitor
|
|||||||
}
|
}
|
||||||
|
|
||||||
$this->values[] = $value;
|
$this->values[] = $value;
|
||||||
$this->types[] = [$field, $value];
|
$this->types[] = [$field, $value, $operator];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user