I need to count the total users from users collection in phalcon that should not include some users.
I have query the result in mongo shell:
db.users.find({"_id": {"$ne": ObjectId("5704a9f3f0616e61138b4618")}}).count()
And it works fine.
But when i query using phalcon mongo model it return nothing. Is there anything i missed on the following query?
Users::count([
'conditions' => [
'_id' => [
['$ne' => new \MongoId($user_id)]
]
]
]);