MongoDB
 sql >> Base de Dados >  >> NoSQL >> MongoDB

Como usar $ e operador no mongodb - driver java


Equivalente no 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));