Affichage des articles dont le libellé est node. Afficher tous les articles
Affichage des articles dont le libellé est node. Afficher tous les articles

lundi 13 février 2017

How to insert data in associate mdoe in sequelize.js , node

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

Let's block ads! (Why?)



How to insert data in associate mdoe in sequelize.js , node