I am new to mongodb concepts. I am trying to get documents from one collection in MongoDB through PHP Phalcon's ODM and more specifically the "aggregate" method of Phalcon\Mvc\Collection. The MySQL equivalent of what I'm trying to do looks like this:
SELECT * FROM nodes WHERE timestamp >= X AND timestamp < Y AND user_id = 25
AND (type = "classic" OR type = "new")
It is pretty simple (for MySQL)
MondoDB's documentation helps, but understanding what Phalcon expects for input to the "aggregate" method seems unclear to me while reading this https://docs.phalconphp.com/en/latest/reference/odm.html#aggregations
I also tried the "find" method of Phalcon\Mvc\Collection, but it either throws errors or returns documents that don't match the conditions.