pipeline中limit和sort 报Cann't read property?
发布于 5 年前 作者 ozhou 755 次浏览 来自 官方Issues
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’

回到顶部