O
O
olezhenka2018-05-17 17:30:42
MongoDB
olezhenka, 2018-05-17 17:30:42

How to edit mongoose document not according to schema conditions?

i have a document:

{
  resources: [1,2,3,4]
}

resources must be an array according to the schema.
I want to edit this property and insert an object there to give to the client.
Setting the schema strict: false is not suitable, I just need to give the modified document to the client, I will not save it.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question