1
0
mirror of synced 2025-01-17 22:11:41 +03:00

Added NOT operator recognition in DQL (fixes #496)

This commit is contained in:
guilhermeblanco 2008-02-15 15:07:47 +00:00
parent a3348ddaa9
commit 09243b2416

View File

@ -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]);
}
}
}
}