pipeline中limit和sort 报Cann't read property?
db.collection('user')
.aggregate()
.lookup({
from: "record",
let:{
openid:"$openid",
},
as: "records",
pipeline:
$.pipeline()
.match(
_.expr(
$.and([
$.eq(['$_openid', '$$openid']),
$.eq(["$correctCount",10])
]
)
).limit(1)
)
})
.project({
_id:0,
nickName:1,
isWinning:1
}).end()
在开发者工具的数据库高级操作报cannot read property ‘sort’ 和cannot read property ‘limit’