[英]How to use $lookup in Angular2-Meteor
I get this error when using $lookup operator in angular2-meteor: 在angular2-meteor中使用$ lookup运算符时出现此错误:
Exception from sub tasks id bAJHF7MZzEidGBZ63 子任务的异常id bAJHF7MZzEidGBZ63
Error: Exception while polling query
{
"collectionName": "tasks",
"selector": {
"$lookup": {
"from": "projects",
"localField": "project._id",
"foreignField": "_id",
"as": "proj"
}
},
"
" options ": {
"transform ": null
}
}:
unknown top level operator: $lookup 未知的顶级操作符:$ lookup
When I query directly using robomongo I get the result. 当我直接使用robomongo查询时,我得到了结果。
versions:
Mongo 3.2.6
angular2-meteor: 0.7.0
Meteor 1.4.2.3
I use: 我用:
Tasks.find()
It seams I need Tasks.aggregate()
that is not implemented 它接缝我需要没有实现的Tasks.aggregate()
We came to conclusion that $lookup in angular2-meteor would corrupt the data. 我们得出的结论是,angular2-meteor中的$ lookup会破坏数据。 We used different approach. 我们使用不同的方法。 We store all needed data in all collections. 我们在所有馆藏中存储所有需要的数据。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.