Efter att ha lagt till en PK i where-satsen where: { id: ['id']}
, började den uppdatera posterna mot kolumnen updateOnDuplicate: ["name"]
const emailCount = await ManageNomineesModel.count({ col: 'email' });
if(emailCount == 0){
await ManageNomineesModel.bulkCreate(allNominees);
res.status(200).json({ message: "Nominees inserted successfully !"});
} else {
await ManageNomineesModel.bulkCreate(allNominees,
{ updateOnDuplicate: ["name"],
where: { id: ['id']}
});
res.status(200).json({ message: "Nominee records updated successfully !"});
}