Trying to figure out the difference in behavior between 'where' and 'and'.
Obviously I can see in the Mongoid::Criteria how it is built out differently, however I would assume that the definition of 'where' and 'and' would be the same, but obviously are not (and I do get different results when chained with other operations).
I see in the Origin documentation that 'where' only passes a '$where' to mongodb when it's passed a string, and indeed actually using a '$where' in mongodb seems to be very bad unless you absolutely need it.
Trying to figure out the difference in behavior between 'where' and 'and'. Obviously I can see in the Mongoid::Criteria how it is built out differently, however I would assume that the definition of 'where' and 'and' would be the same, but obviously are not (and I do get different results when chained with other operations).
I see in the Origin documentation that 'where' only passes a '$where' to mongodb when it's passed a string, and indeed actually using a '$where' in mongodb seems to be very bad unless you absolutely need it.