I am new to MongoDB. And now i got a puzzle: say i've got a query workable in mongo console
{ "people":{ "name":"arthur", "tele": "001-837475" "address":{ "country":"us", "state" : "CA", "city" : "LA" } } }I've got pretty many record like this. & I want to query for all people who come from CA. The query below works well in mongo shell
db.test.find("people.address.state":"CA")But I must do the query in Java. Perhaps using DBObject or BasicDBObject,
PS: I don't want to use other opensource packages. just the mongodb-java-driver would be delightful.
Thanks.
--
You received this message because you are subscribed to the Google
Groups "mongodb-user" group.
To post to this group, send email to mongod...@googlegroups.com
To unsubscribe from this group, send email to
mongodb-user...@googlegroups.com
See also the IRC channel -- freenode.net#mongodb