Categories
How to make a field where only two mongoDb selections are stored?
So that the field has something like 1 or 0 , in my case Public or private ?
Answer the question
In order to leave comments, you need to log in
This is entirely up to the developer. Mongo does not impose special requirements on documents (well, except for valid json). Therefore, at the insert / update stage, you must ensure that either 0 or 1 is written to your field.
Didn't find what you were looking for?
Ask a Question
731 491 924 answers to any question