Open
Description
Thanks to @framirez07 it became apparent that adding (or removing) more than 4 associated records in the add<Model>
input argument for a to_many
association will lead to a Operation Timeout
Error.
This is because every associated record starts a transaction in the model-layer "infix" function inside a for await
loop in the resolver, which causes the database (or sequelize) to do a Timeout.
To fix this bug remove the transactions from the model-layer infix functions in sql-models and sql-adapter by changing the add_
and remove_
functions as sketched below
NEW "infix" function
static async add_accessionId(measurement_id, accessionId) {
let updated = await Measurement.update({
accessionId: accessionId
}, {
where: {
measurement_id: measurement_id
}
})
return updated;
}
update respective unit tests