嵌套的预先加载sequelize(belongsTo和belongsToMany在同一个查询中)

在具有Express(4.15.2),Sequelize(3.30.0)和Mysql的NodeJS服务器(8.6.0)上,我正面临以下“简单”用例:(不要关注表名;) )我定义了这个模型:

Child.belongsTo(儿子)Child.belongsToMany(父母)

tableName: 'Child', classMethods: { associate: function(models) { this.belongsToMany(models.Parent, { as :{ singular: 'child', plural: 'children' }, through: 'Parent_Child'} ); this.belongsTo(models.Son, {foreignKey : 'fkSon', as :'son' }); } 

我想要查询所有相关的模型到一个相同的查询。 我的模型定义工作正常。 我可以得到父母相关的儿童和儿子相关的,但不是两个。

这里查询我尝试运行不幸(由sequelize doc启发http://docs.sequelizejs.com/manual/tutorial/models-usage.html#nested-eager-loading

 models.Child.findAll({ include : [{model : models.Son, as:'son', include : [{model : models.Parent, as : 'children', through: 'Parent_Child' , require : true}] }] 

我有以下错误:错误:父(子)没有关联到儿子!

提前谢谢了 :)