更新时间:2023-02-27 15:11:44
Try to pass as property with name that you already defined in the association:
as
return models.Entry.findById(id, { include: [{ model: models.Entry, as: 'ParentEntry' }] })
查询与Sequelize的自我加入,包括相关记录