Hi,
I have a problem with two method hasOne and hasMany.
I have two tables : Driver and Ad
Driver has hasOne(Ad) association
My code :
let driver = await models.Driver.findById(3, {
include: [{
model: models.Ad
}]
});
driver.createAd({
message: "HELLO"
});
Why i can create many Ad but association is hasOne ?
The FK driver_id is not unique !
An idea ?
Sorry for my english