-
Notifications
You must be signed in to change notification settings - Fork 445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MongoDB\Collection doesn't have group method.. #1162
Comments
The Mongo mapper was only built and tested for the old legacy Mongo PECL extention and then patched for the newer MongoDB extention. The used collection->group method is existing right here: https://www.php.net/manual/de/mongocollection.group.php ref. |
Many thanks.. after days study.. i've realized that "group" is mainly for old version mongo, and "aggregate" is for newer MongoDB.. But this "aggregate" thing is way too far for me to coding into proper functions. I've refered to many other frameworks, like think-orm, lavaral, but none-of-them resolve aggregate well.
I am using fatfree framework for 2 years, and it's quite to my taste. I feel honored to write something for it. But there is a question that confuses me. In lib/db/mongo.php that writes. "$this->db=(new \MongoDB\Client($dsn,$options?:[]))->$dbname;". Is this "\MongoDB\Client" comes from mongo-php-library(https://github.com/mongodb/mongo-php-library), which i think is not matched for "fatfree"?
Thanks again for replying.
Yours, sincerely
|
yes it is... the mongo-php-library github repository is the newer next-gen lib that we should adapt to.. or rewrite it completely and use the low-level-api from https://www.php.net/manual/en/set.mongodb.php which probably becomes a lot of fun implementing it... great chance for creative minds ;) |
Okay... thanks.. i'll try.. |
I see this frame already uses new \MongoDB\Client to support new Mongodb drive on php7, however in db/mongo/mapper.php, when handling 'group', it uses "$this->collection->group" which doesn't exist in class MongoDB\Collection. What should i do?
The text was updated successfully, but these errors were encountered: