I tested it last night and it seems to work fine,
OpenBD nightly,
i always replace the mongo-java-driver-3.0.4.jar with the most recent
mongo-java-driver-3.2.2.jar,
http://mvnrepository.com/artifact/org.mongodb/mongo-java-driver/3.2.2.
tested with both mongodb 2.6.12 and 3.2.5,
simple test on contact collection increment zip by 1 (it's only a test) and
updating city to Seattle.
MongoCollectionupdate(
"mongods", "contact",
{ _id: MongoObjectId("571c79177215a00a0cc46d12") },
{ $inc: { 'zip': 1 },
$set: { 'city': "Seattle" } }
);
good luck.
On Friday, April 22, 2016 at 1:11:52 PM UTC-5, Linjuan Gong wrote:
>
> Have any of you using OpenBD nightly/version 3.2? Does your
> MongoCollectionupdate work? We need to update then mongodb to 3.2. In this
> case we need to update our OpenBD to nightly/version 3.2. I tried to test
> it, but it having issues in MongoCollectionupdate.
> I got some error like:
> java.lang.IllegalArgumentException: Invalid BSON field name name
>
> Some post talk about this error is related to: *MongoDB update using Java
> 3 driver*
> <http://stackoverflow.com/questions/29434207/mongodb-update-using-java-3-driver>
>
> coll.updateOne(eq("name", "frank"), new Document("$set", new
> Document("age", 33)));
> coll.replaceOne(eq("name", "frank"), new Document("age", 33));
> coll.findOneAndReplace(doc1, doc2);
>
> I wonder if the MongoCollectionupdate handles this in OpenBD
> nightly/version 3.2.
>
> I also found the Menu for MongoCollectionupdate
> http://openbd.org/manual/?/function/mongocollectionupdate is not
> accessible.
>
> I appreciate your help!
>
> Lin
>
>
>
>
--
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en
---
You received this message because you are subscribed to the Google Groups "Open
BlueDragon" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.