diff --git a/lib/collection.js b/lib/collection.js index b0335bc6..c6d954e4 100644 --- a/lib/collection.js +++ b/lib/collection.js @@ -292,6 +292,9 @@ Collection.prototype.group = function (keys, condition, initial, reduce, finaliz fn = opts opts = {} } + + console.warn('DEPRECATED (collection.group): MongoDB 3.6 or higher no longer supports the group command. We recommend rewriting using the aggregation framework.') + return this._dispatch(function group (args) { return args.col.group(args.keys, args.condition, args.initial, args.reduce, args.finalize, args.command, args.options) })({options: opts, keys: keys, condition: condition, initial: initial, reduce: reduce, finalize: finalize, command: command, callback: fn}, 'group')