MongoDB
 sql >> Database >  >> NoSQL >> MongoDB

Come usare $ e l'operatore in mongodb - driver java

Equivalente nel driver java.

List<DBObject> criteria = new ArrayList<DBObject>();
criteria.add(new BasicDBObject("totalmarks", new BasicDBObject("$ne", 10)));
criteria.add(new BasicDBObject("totalmarks", new BasicDBObject("$ne", 15)));
DBCursor dbCursor = collection.find(new BasicDBObject("$and", criteria));