M
M
mozart13372016-04-03 12:32:39
MongoDB
mozart1337, 2016-04-03 12:32:39

Is it possible to lock a document in mongodb?

For the duration of the operation, you need to lock the document in Mongo and then unlock it. Can this be done manually?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lega, 2016-04-03
@lega

You can set a "flag" (for example, blocked: 123), and check it every time the document changes.
see https://docs.mongodb.org/manual/tutorial/perform-t...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question