I have associations between the two models that are defined below:
For contact model (in a separate file)
classMethods: { associate: function (models){ Contact.belongsTo(models.User) } }
For the user (in a separate file)
classMethods: { associate: function (models){ User.hasMany(models.Contact, {onDelete: 'CASCADE'}) } }
The problem is that when a user is deleted, the contact associated with the user does not remove any advice about what I am doing wrong would be helpful?
Thanks in advance
user2019726
source share