Added NOT operator recognition in DQL (fixes #496)
This commit is contained in:
parent
a3348ddaa9
commit
09243b2416
@ -63,10 +63,16 @@ 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 {
|
||||
return $this->load($parts[0]);
|
||||
// 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]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user