如何用 mongoid 编写以下 mongodb 查询?
db.messages.find({
$or :[
{ $and : [
{"receiver_id":"user1@gmail.com"},
{"sender_id":"user2@hotmail.com"}
]
},
{ $and : [
{"receiver_id":"user2@hotmail.com"},
{"sender_id":"user1@gmail.com"}
]
}
]
});