node-ottoman icon indicating copy to clipboard operation
node-ottoman copied to clipboard

strict tag can be used on updateById?

Open C0DE-IN opened this issue 4 years ago • 1 comments

Iam creating documents on strict mode but wanted to eleminate some fields on pre save, but when i access the model its expecting to have the eleminated field, below syntax doesnt help either, what could be the possible solution for temporary data which should be validated but not saved in doc? UserModel.updateById(user.id, { verifiedAt: new Date() }, { strict: false })

C0DE-IN avatar Sep 03 '21 12:09 C0DE-IN

hi @noiissyboy not clear with your example, can you please elaborate ?

AV25242 avatar Sep 07 '21 21:09 AV25242