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

(MongoDB Java) $ push nell'array

DBObject listItem = new BasicDBObject("scores", new BasicDBObject("type","quiz").append("score",99));
DBObject updateQuery = new BasicDBObject("$push", listItem);
myCol.update(findQuery, updateQuery);