You can use this.associations.OtherModel.target .
module.exports = function(sequelize, DataTypes) { var MainModel = sequelize.define('MainModel', { name: { type: DataTypes.STRING, } }, { classMethods: { associate: function(models) { MainModel.hasOne(models.OtherModel, { onDelete: 'cascade', hooks: true }); } }, hooks: { afterCreate: function(mainModel, next) { this.associations.OtherModel.target.create({ MainModelId: mainModel.id }) .then(function(otherModel) { return next(null, otherModel); }) .catch(function(err) { return next(null); }); } } }); return MainModel; };
source share