我是feathersjs框架的新手,並試圖編寫聚合查詢它不能正常工作。如何使用貓鼬羽毛適配器編寫聚合體?
hook.app.query = {
lookup: {
from: "orders",
localField:"serviceLocationId",
foreignField:"serviceLocationId",
as: "orders"
},
match: { serviceLocationId : { $in: Array.from(new Set(reqArr)) } },
limit: 14
}
hook.app.service('servicelocations')
.find(hook.app.query)
.then(result => {
console.log(result)
})
有相當多的對HTTPS連接Sequelize關聯的信息://docs.feathersjs。 com/api/databases/sequelize.html#associations-and-relations – Daff
舉個例子@Daff –