Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
265 views
in Technique[技术] by (71.8m points)

Updating multi level Embedded document in Mongo using reactivemongotemplate

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...