How can we we give query for embedded documents through java driver?
问题 i want to access the embedded document through java query from mongodb.from a simple document its easy but how can we access from embedded document ? 回答1: If I understand you correctly, you can find the answer of your question below. Say you have the following nested document. { "key1" : "value1", "key2" : { "key21" : "value21", "key22" : "value22" } } If you mean to make query on the nested documents then you can access the embedded object using the following java code. DBCollection coll =