Closed aaronpanch closed 12 years ago
Not missing anything, I would expect this it negate it.
Sorry I was wrong - the behaviour is correct since $not can only affect other operators - so not in a normal query. From the docs:
"The $not meta operator can only affect other operators."
http://www.mongodb.org/display/DOCS/Advanced+Queries#AdvancedQueries-Metaoperator%3A{{%24not}}
I'm sorry to bother, but I'm not sure if I am missing some of the Mongoid/Origin functionality. I'm trying to run a negation on a '.where' query but it doesn't seem to produce a negated result. I have a model called user:
However when I attempt to query from the Rails console
And it seems as if the selector isn't producing the expected { "$not" => { "fname" => "Aaron" }} result for negation. Am I missing something? Or do I have a faulty setting? I'm running mongoid (3.0.1), moped (1.1.5), and origin (1.0.4).
Thanks!