【发布时间】:2017-06-07 23:05:40
【问题描述】:
是否有人在 Sequelize 中成功使用嵌套包含以及 Limit 和 Offset。我正在尝试使用 Sequelize 实现服务器端分页,任何人都可以告诉我任何参考。我正在使用 Sql Server 数据库。当我尝试执行此操作时,我看到该查询与连接一起被转换为子查询。有人收到了吗
{where: query.activity,
attributes: [...activityAttributes, 'LastModifiedUserID', 'LastModifiedDateUTC', 'SPIStatus'],
include: [
{
model: Issue,
where: query.issue,
attributes: issueAttributes,
include: [{
model: Product,
where: query.product,
attributes: productAttributes
},
{
model: IssueExtendedAttribute,
where: {$and: query.issueExtendedAttributes},
required: !!query.issueExtendedAttributes
}]
}],
offset: 10,
limit: 10}
【问题讨论】:
-
你修好了吗?我有同样的问题stackoverflow.com/questions/43729254/…
标签: node.js sequelize.js