Posts by Diego Schinemann • 31 points
2 posts
-
0
votes1
answer911
viewsA: Relationship between tables with Sequelize
1 collaborator 'belongsTo' sector 1 sector 'hasMany' collaborator, At Migration, you need to tell which field will be the foreign key! ex: codigoSetor: { type: Sequelize.INTEGER, allowNull: false,…
-
1
votes2
answers228
viewsQ: Separating elements from an array for sequelize query
This id_message I send by parameter by my request, a console.log in this returns me the value of the image. const id_mensagem = [...new Set(response.data.map(mensagens => mensagens.id_mensagem))]…