Vote count: 0
Many to many association between role and permission. Association done successfully
Joining table name is RolePermission
I save data in role like this
models.Role.create(role)
.then(function(data){
// here I create RolePermission with role.id and req.body.permission_id
})
I want to know either I manually insert data in RolePermission or any sequelize
or node.js method available?
Like I see parent.createChild
. How I use it or best practice?
asked 20 secs ago
How to insert data in associate mdoe in sequelize.js , node
Aucun commentaire:
Enregistrer un commentaire