$push and $set in same MongoDB update

I don’t know Java driver, but do you have to create a list there? What happens if you try this code? BasicDBObject update = new BasicDBObject().append(“$push”, new BasicDBObject().append(“values”, dboVital)); update = update.append(“$set”, new BasicDBObject().append(“endTime”, time)); collection.update( new BasicDBObject().append(“_id”, pageId), update, true, false); This should produce the equivalent of db.collection.update({_id: pageId}, {$push: {values: dboVital}, $set: {endTime: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)