I’m looking for the mongoid equivalent to:
How to select the comparison of two columns as one column in Oracle
I can’t seem to find any documentation or examples comparing columns within the same query. Is this just not possible in Mongoid?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Nope, you need to drop down to the mongodb ruby driver to do this and it will potentially be very slow as it is a javascript query that will not use an index:
Which is equivalent to third shell command here.:
Note: if a document does not have key
nameand that same document also does not have keyname2that this will return true because null == null.