aspose file tools*
The moose likes MongoDB and the fly likes MongoDB $in with $and Query in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » MongoDB
Bookmark "MongoDB $in with $and Query in Java" Watch "MongoDB $in with $and Query in Java" New topic
Author

MongoDB $in with $and Query in Java

Charlie Green
Greenhorn

Joined: Jun 29, 2013
Posts: 6
Is this type of query possible?

I need to query the database for data for a specified date for a set of specified stocks. So the data needs to have "this" date and be one of "these" symbols.

I have the following code:


This always comes up null. Can someone explain how to make a query like this work?
Charlie Green
Greenhorn

Joined: Jun 29, 2013
Posts: 6
I found a solution in case anyone else needs to do something similar:

 
wood burning stoves
 
subject: MongoDB $in with $and Query in Java