Browse Source

Use where() instead of andWhere().

This avoid having to add annotation for andWhere() to QueryInterface.
ADmad 8 years ago
parent
commit
a1683f2b60
2 changed files with 1 additions and 2 deletions
  1. 0 1
      src/Datasource/QueryInterface.php
  2. 1 1
      src/ORM/Association.php

+ 0 - 1
src/Datasource/QueryInterface.php

@@ -18,7 +18,6 @@ namespace Cake\Datasource;
 /**
  * The basis for every query object
  *
- * @method $this andWhere($conditions, $types = [])
  */
 interface QueryInterface
 {

+ 1 - 1
src/ORM/Association.php

@@ -956,7 +956,7 @@ abstract class Association
         $target = $this->_targetTable;
         if (!empty($options['negateMatch'])) {
             $primaryKey = $query->aliasFields((array)$target->getPrimaryKey(), $this->_name);
-            $query->andWhere(function ($exp) use ($primaryKey) {
+            $query->where(function ($exp) use ($primaryKey) {
                 array_map([$exp, 'isNull'], $primaryKey);
 
                 return $exp;