Answer the question
In order to leave comments, you need to log in
How to add value to mognodb field?
I have a collection with a document, the number 1 is stored in the document in the count field, how can I write a query that will update this value, adding to the already existing one (in this case it is 1) which I will indicate purely.
In sql, it would look something like this update table set field = filed + 999
I did not find anything better than choosing the value first, and then inserting the same value + the one I need in the callback, but it seems to me that this can be done in one query .
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question