In doing a partial update of a model with these example definitions:
const encryptedFields = EncryptedField(Sequelize, 'your_key_here');
// Further down...
encrypted: encryptedFields.vault('encrypted_vault_example'),
firstName: encryptedFields.field('foo', {
type: Sequelize.STRING,
}),
email: encryptedFields.field('bar', {
type: Sequelize.STRING,
}),
It appears that when doing a Model.update it doesn't correctly fetch the existing encrypted value and then set a certain field, but instead overwrites the entire vault field with just what was updated.