[java] MongoCollection.findOneAndUpdate() doc problem?

447 views
Skip to first unread message

Alan Williamson

unread,
Sep 29, 2015, 2:39:51 PM9/29/15
to mongodb-user
Good day all,

I am looking at the documentation for the Java driver for 3.0.4



This is the function signature:

void findOneAndUpdate(Bson filter,
                      Bson update,
                      FindOneAndUpdateOptions options,
                      SingleResultCallback<TDocument> callback)


However the 3.0.4 driver does not have this signature, it is missing the callback parameter and instead has the following signature:

Document findOneAndUpdate(Bson filter,
                      Bson update,
                      FindOneAndUpdateOptions options )


So there is something out of sync somewhere.

Anyone else noticed this problem?   Is there any JavaDoc documentation for 3.0.4 that actually matches the jar?

thanks

a

Jeff Yemin

unread,
Sep 29, 2015, 2:52:10 PM9/29/15
to mongod...@googlegroups.com
Hi Allan

The 3.0 Java driver has both synchronous and asynchronous versions of MongoClient, MongoDatabase, and MongoCollection. The synchronous ones are in the com.mongodb.client package, while the asynchronous ones are in the com.mongodb.async.client package.


For more information about the synchronous and asynchronous drivers, have a look at the reference documentation.

Apologies for the confusion. I'll think about if there's anything we can or should do to reduce the possibility for confusion.


Regards,
Jeff

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/1b8a8f81-8c93-4838-b416-9dd7c78ebd7a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alan Williamson

unread,
Sep 29, 2015, 4:10:47 PM9/29/15
to mongodb-user
Wonderful Jeff ... this explains it.

I am currently porting over the Mongo integration of OpenBD to use the new 3.0 world and use there was definitely some confusion.

Thank you
Reply all
Reply to author
Forward
0 new messages