YZ
Size: a a a
YZ
YZ
К🇦
К🇦
Event.belongsToMany(models.Employee, { as: 'Employee', through: 'EventEmployee' });К🇦
async test(req, res) {
try {
console.log(req.body);
await Employee.create({ name: 'nice owner', event: [{ name: 'nice property' }, { name: 'ugly property' }] }, { include: [Event] });
} catch (err) {
res.status(500).send({
error: 'возникла ошибка при добавлении записи',
});
console.log(err);
}
},
};YZ
К🇦
К🇦
YZ
К🇦
A
Event.belongsToMany(models.Employee, { as: { singular: "asdasdasd", plural: 'EventEmployees'}, through: 'EventEmployee' });A
A
К🇦
YZ
К🇦
К🇦
YZ
YZ