且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

查询与Sequelize的自我加入,包括相关记录

更新时间:2023-02-27 15:11:44

Try to pass as property with name that you already defined in the association:

return models.Entry.findById(id, {
    include: [{
        model: models.Entry,
        as: 'ParentEntry'
    }]
})

相关阅读

技术问答最新文章