Skip to content

Commit

Permalink
Revert back "andWhere()" calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Aug 22, 2017
1 parent dc0d384 commit 16cd1c8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Datasource/QueryInterface.php
Expand Up @@ -18,6 +18,7 @@
/**
* The basis for every query object
*
* @method $this andWhere($conditions, $types = [])
*/
interface QueryInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/Association.php
Expand Up @@ -956,7 +956,7 @@ protected function _appendNotMatching($query, $options)
$target = $this->_targetTable;
if (!empty($options['negateMatch'])) {
$primaryKey = $query->aliasFields((array)$target->getPrimaryKey(), $this->_name);
$query->where(function ($exp) use ($primaryKey) {
$query->andWhere(function ($exp) use ($primaryKey) {
array_map([$exp, 'isNull'], $primaryKey);

return $exp;
Expand Down
2 changes: 1 addition & 1 deletion src/ORM/Association/BelongsToMany.php
Expand Up @@ -510,7 +510,7 @@ protected function _appendNotMatching($query, $options)
$subquery = $this->_appendJunctionJoin($subquery, $conditions);

$query
->where(function ($exp) use ($subquery, $conds) {
->andWhere(function ($exp) use ($subquery, $conds) {
$identifiers = [];
foreach (array_keys($conds) as $field) {
$identifiers = new IdentifierExpression($field);
Expand Down

0 comments on commit 16cd1c8

Please sign in to comment.