alcaeus / mongo-php-adapter

:link: Adapter to provide ext-mongo interface on top of mongo-php-library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No such command: 'group'

nirmit opened this issue · comments

I am trying to use the group() method in the MongoCollection class and I keep getting the error

no such command: 'group'

Not really sure what to do here but MongoDB doesn't have a group command anymore; instead they have an aggregate() method and a mapReduce() method. Can you please look into the group() method?

Hi,

that is expected: you'll want to refactor your application to avoid the group command, either by using aggregate or group.

Note that this library is designed as a polyfill to help with the transition to the new MongoDB driver. As such, it is expected to work less and less with newer MongoDB Server versions, as supporting those is not the goal of this project.