You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongod...@googlegroups.com
You should be able to use the BasicDBObject.toString() method to export the query as JSON, which you can then copy/paste into the shell. Have you tried running that outside of the Java application and confirming if it yields the expected results?
Your second code example looks correct when compared to one of the answers in http://stackoverflow.com/questions/10444038/mongo-db-query-in-java. The only difference is that you were using a BasicDBList instead of an ArrayList in the SO example, which I don't think is reason for concern.