diff --git a/packages/cms/scripts/migration/db_0.21/profile_meta.js b/packages/cms/scripts/migration/db_0.21/profile_meta.js index 2d66dd2a4..680b050bd 100644 --- a/packages/cms/scripts/migration/db_0.21/profile_meta.js +++ b/packages/cms/scripts/migration/db_0.21/profile_meta.js @@ -38,7 +38,7 @@ module.exports = function(sequelize, db) { p.associate = models => { p.hasMany(models.search, {foreignKey: "cubeName", sourceKey: "cubeName", as: "members", constraints: false}); - p.belongsTo(models.profile, {foreignKey: "id", sourceKey: "profile_id", as: "profile"}); + p.belongsTo(models.profile, {foreignKey: "id", sourceKey: "profile_id", as: "profile", constraints: false}); }; return p; diff --git a/packages/cms/src/db/profile_meta.js b/packages/cms/src/db/profile_meta.js index 2d66dd2a4..680b050bd 100644 --- a/packages/cms/src/db/profile_meta.js +++ b/packages/cms/src/db/profile_meta.js @@ -38,7 +38,7 @@ module.exports = function(sequelize, db) { p.associate = models => { p.hasMany(models.search, {foreignKey: "cubeName", sourceKey: "cubeName", as: "members", constraints: false}); - p.belongsTo(models.profile, {foreignKey: "id", sourceKey: "profile_id", as: "profile"}); + p.belongsTo(models.profile, {foreignKey: "id", sourceKey: "profile_id", as: "profile", constraints: false}); }; return p;