Sequelize won't update JSON field under some circumstances.
For example, I have:
[] (an array inside array)
And I'm trying push something:
instance.arr.push(1); // [[1,1]]
Now inside instance I have changed array and nothing changed inside db. Not even a query is sent. :(
From sequelize website:
The save method is optimized internally to only update fields that really
changed. This means that if you don't change anything and call save,
Sequelize will know that the save is superfluous and do nothing, i.e.,
no query will be generated (it will still return a Promise, but it
will resolve immediately).
That's good but seems like it doesn't work for json, can I do a force update?
As of today I have to do a deep copy of array to save it.
I'm using MariaDB IDK if that matters.