Method "\yii\mogo\Collection::buildLikeCondition()" fixed to use \MongoRegex.

This commit is contained in:
Paul Klimov
2013-12-06 11:38:00 +02:00
parent 380d1d02fb
commit 8032785f0d
2 changed files with 16 additions and 1 deletions

View File

@@ -907,6 +907,9 @@ class Collection extends Object
throw new InvalidParamException("Operator '$operator' requires two operands.");
}
list($column, $value) = $operands;
return [$column => '/' . $value . '/'];
if (!($value instanceof \MongoRegex)) {
$value = new \MongoRegex($value);
}
return [$column => $value];
}
}