Is it possible to get a list of all the fields in a DBObject? I have searched through the documentation and can't find anything. Thanks.

有帮助吗?

解决方案

BasicDBObject implements the java.util.Map interface. So, you can use the Map's keySet() method to get the list of keys (or "fields").

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top