I have an embedded document. How can I update the multilevel document? At the time of insert, using Document to store the document. When updating the embedded document with update.set()
, I can only do a string and not as an embedded document(storing it as null other than string).
The obj.getEmbeddedDocument()
is returning me an object. I am able to use Gson library to update, but that is getting stored as String instead of embedded document.
Any suggestions?
[{"test1":[{"inside1":"value","inside2":"value"},
{"inside11":"value","inside21":"value"}]},
{"test2":[{"inside1":"value","inside2":"value"},
{"inside11":"value","inside21":"value"}]}]
question from:
https://stackoverflow.com/questions/66057363/updating-multi-level-embedded-document-in-mongo-using-reactivemongotemplate 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…