FAQ
Thanks Scott. In my code, there is $exist inside of the $nor.

BasicDBObject queryA = new BasicDBObject();
BasicDBObject queryB = new BasicDBObject();

//or operation
DBObject findObj = QueryBuilder.start().or(queryA).or(queryB).get();

//nor operation
???

My question is to fill the "???" there. I don't know how to do nor with
the QueryBuilder, or is there any work-around? Thank you.

On Mon, Apr 2, 2012 at 2:03 PM, Scott Hernandez wrote:

Can you give me an example of what you have now so I can best apply it
do your code?

Here is a short example using $nor :
coll.find(new BasicDBObject("$nor", new BasicDBObject[] {new
BasicDBObject("field1","a"), new BasicDBObject("field1","b")}));

It is just like $or, but with an "n" in the middle there.
On Mon, Apr 2, 2012 at 4:35 PM, George Pang wrote:
Thank you, but I found method for $or, not for $nor in the api
(http://api.mongodb.org/java/current/), would you give me short code
example?


On Mon, Apr 2, 2012 at 1:27 PM, Scott Hernandez <
scotthernandez@gmail.com>
wrote:
Yes, you can represent any query with the java driver using the
DBObject (BasicDBObject/BasicDBObjectBuilder).
On Mon, Apr 2, 2012 at 4:25 PM, georgep wrote:
Does mongoDB java driver support $nor operation? Thank you!

--
You received this message because you are subscribed to the Google
Groups
"mongodb-user" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/mongodb-user/-/4Sry-nIp_GsJ.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to
mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/mongodb-user?hl=en.
--
You received this message because you are subscribed to the Google
Groups
"mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to
mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/mongodb-user?hl=en.
--
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to
mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/mongodb-user?hl=en.
--
You received this message because you are subscribed to the Google Groups
"mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to
mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/mongodb-user?hl=en.
--
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To post to this group, send email to mongodb-user@googlegroups.com.
To unsubscribe from this group, send email to mongodb-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 6 | next ›
Discussion Overview
groupmongodb-user @
categoriesmongodb
postedApr 2, '12 at 8:26p
activeApr 2, '12 at 10:23p
posts6
users2
websitemongodb.org
irc#mongodb

2 users in discussion

George Pang: 3 posts Scott Hernandez: 3 posts

People

Translate

site design / logo © 2021 Grokbase