Is there a bulk update in official java/scala mongo driver with different filters per update?

Hello Community.

I am migrating an application from using reactivemongo driver to using the official mongo scala driver. I am having trouble migrating a bulk update from reactivemongo which can accept multiple updates with each update having its own filter. As far as I know, updateMany in the official driver use only one filter. Did I miss something in the documentation? Are there other ways to do a bulk update with different filters (aka Where clause) for each update?

Many Thanks.

Have you had a look at BulkWrite? Including both the MongoDB reference docs and some sample code in Scala to help you get started –

Hi Ashni. Yes, this was exactly what I was looking for. Combined with transactions api, I have all that I need to migrate. Thanks a lot.