TylerBrock / mongo-hacker

MongoDB Shell Enhancements for Hackers
tylerbrock.github.io/mongo-hacker
MIT License
1.79k stars 235 forks source link

Mongoose as mongo-hacker? #209

Closed IDONTSUDO closed 4 years ago

IDONTSUDO commented 4 years ago

want to use a mongo hacker with a mongoos. There is support for this plugin from the mongoos side.

(just very complex database queries)

at the moment the request is giving me

TypeError: Message.find(...).last is not a function at data.map.one (/home/idontsudo/job/erp/server/root/controllers/Messages.js:24:16) at Array.map () at Chanel.find.countDocuments.then.then.data (/home/idontsudo/job/erp/server/root/controllers/Messages.js:23:35) at tryCatcher (/home/idontsudo/job/erp/server/root/node_modules/fawn/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/idontsudo/job/erp/server/root/node_modules/fawn/node_modules/bluebird/js/release/promise.js:512:31)

stennie commented 4 years ago

mongo-hacker is an extension for the mongo shell. It is not intended (or expected) to work from Mongoose or a Node.js library.