问题
I am trying to use the $lookup
aggregate stage in meteor mongo using aggregate and reactive-aggregate. Unfortunately I am getting this error.
Exception from sub Feed id H3yhzuXdAk6LuQa7h MongoError: exception: Unrecognized pipeline stage name: '$lookUp'
I know I am not the only one struggling here based on the meteor blogs, https://forums.meteor.com/t/new-mongodb-lookup-aggregation-operator-in-3-2/6784, so any inputs ideas, workarounds but most particularly working source examples of reactive aggregates with $lookup
would be great.
Edit: Alright so I start my meteor app by clicking test.bat
cd "."
start myDb.bat
start dbShell.bat
%MONGO_URL%=mongodb://localhost:27017/common
start met.bat
start "google chrome" http://localhost:3000
mydb.bat
mongod
met.bat
meteor
bdShell.bat
mongo
link.bat
start "google chrome" http://localhost:3000
回答1:
The problem is that meteor's default mongo is pinned at 2.6.7 (at 1.3 version meteor).
Set your mongo url to a 3.2 database to use lookup
$ MONGO_URL=mongodb://localhost/meteor meteor
(where mongo url points to a 3.2 db)
来源:https://stackoverflow.com/questions/37122518/why-cant-i-use-lookup