Sign In Register

How can we help you today?

Start a new topic
Answered

Set writeConcern in update() queries

Hi,


I would like to set the writeConcern for some update queries (https://docs.mongodb.com/manual/reference/write-concern/)

Is this possible? When I try an update like this:

 

col.update({"_id": id, updateQuery, {
    upsert: true,
    multi: false,
    writeConcern: {w: 0}
});

 

I get the message "Can't find method com.gamesparks.scripting.mongo.impl.SparkMongoCollectionReadWriteImpl.update(object,object,object)."


Best Answer

Hi David,


You are receiving this error as the writeConcern method isn't exposed to users. Having spoken to the dev team they have informed me that it is unlikely to be exposed in the future.


Thanks,

Liam

1 Comment

Answer

Hi David,


You are receiving this error as the writeConcern method isn't exposed to users. Having spoken to the dev team they have informed me that it is unlikely to be exposed in the future.


Thanks,

Liam

Login to post a comment