Commit 09243b24 authored by guilhermeblanco's avatar guilhermeblanco

Added NOT operator recognition in DQL (fixes #496)

parent a3348dda
......@@ -63,13 +63,19 @@ abstract class Doctrine_Query_Condition extends Doctrine_Query_Part
}
$r = implode(' OR ', $ret);
} else {
// Fix for #710
if (substr($parts[0],0,1) == '(' && substr($parts[0], -1) == ')') {
return $this->parse(substr($parts[0], 1, -1));
} else {
// Processing NOT here
if (strtoupper(substr($parts[0], 0, 4)) === 'NOT ') {
$r = 'NOT ('.$this->parse(substr($parts[0], 4)).')';
} else {
return $this->load($parts[0]);
}
}
}
}
return '(' . $r . ')';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment