我正在尝试在两个交叉数据库之间建立关联。但我没有任何解决方案。所以任何人都知道然后提供帮助。
account_user.belongsTo(models.medical_country, { foreignKey:'country_id', targetKey: 'name'} );
account_user.hasMany(models.account_user_sharing, { foreignKey:'shared_by', as:'sharedBy'} );
account_user.hasMany(models.device_security, {foreignKey: 'user_id', as: 'securitySettings'});
account_user.hasMany(models.account_doctorpatient, {foreignKey: 'doctor_id', as:'flag'});
account_user.belongsTo(models.account_pharmacist, {foreignKey: 'pharmacist_id', as: 'pharmacist'});
account_user.hasMany(models.user_notification, {foreignKey: 'user_id', as: 'notification'});