Skip to content

Commit

Permalink
Merge branch 'begnini_cake2.2' into cake2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed May 1, 2013
2 parents 01b1e5c + 977dd3b commit 29338d6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Model/Behavior/SqlCompatibleBehavior.php
Expand Up @@ -173,9 +173,12 @@ protected function _translateConditions(Model &$Model, &$conditions) {
$return = false;
foreach($conditions as $key => &$value) {
$uKey = strtoupper($key);
if (substr($uKey, -5) === 'NOT IN') {
if (substr($uKey, -6) === 'NOT IN')
{
// 'Special' case because it has a space in it, and it's the whole key
$conditions[substr($key, 0, -5)]['$nin'] = $value;
$field = trim(substr($key, 0, -6));

$conditions[$field]['$nin'] = $value;
unset($conditions[$key]);
$return = true;
continue;
Expand Down

0 comments on commit 29338d6

Please sign in to comment.