sequelize bulkCreate with updateOnDuplicate on all columns

Viewed 520

I am using sequelize to perform a bulkCreate on one of my models. It is basically a simple sync-operation and therefore I want to update the rows that already exist. As per, the updateOnDuplicate is described as:

Fields to update if row key already exists (on duplicate key update)? (only supported by MySQL, MariaDB, SQLite >= 3.24.0 & Postgres >= 9.5). By default, all fields are updated.

However, there is no way to perform the default behavior. sequelize expects an array of strings and won't except e.g. a simple true for all columns.

So how can i update ALL fields?

0 Answers
Related