I'm trying to save sequelize models with their associations. All the associations are one to one. Retrieving models with associations from the database works just fine but inserting them is another matter and the documentation is just making me more confused.
Here's my insert method:
models
.radcheck
.create(user, {
include: [{model: models.skraningar}, {model: models.radusergroup}, {model: models.radippool}]
})
.then(success, error);
I've seen so many ways to do this both in the documentation and here on stackoverflow and none of them make sense to me so far. Anyone care to clear things up for me?