Hi,i am working on the migration to the new php driver from mongodb, at this moment i have no idea what exactly the problem is, the query works fine with the old driver, actually i am getting no query or php error, here the print_r from the executed aggregation: https://gist.github.com/Bodenhaltung/b46e24b5b204eb3353bd5e731e877820
There is no "result" array, and as i said, i get not really a error message, or miss i something?
Thanks for your help and pointing me in the right way.Best regards,Norbert
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/26ce80ae-eaf6-4031-9c22-d216ab430145%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Just like with a normal query, you need to iterate on the cursor to obtain the aggregation results. If the result is small, you can also use MongoDB\Driver\Cursor::toArray() to iterate over all of the results (including subsequent batches) and collect them in a single PHP array. This is effectively the same as calling iterator_to_array() on a Cursor object. Note that this approach will use more memory than standard iteration with a foreach loop.