Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is bulkwrite with aggregation pipeline supported ? #226

Open
weswes opened this issue Oct 11, 2023 · 1 comment
Open

Is bulkwrite with aggregation pipeline supported ? #226

weswes opened this issue Oct 11, 2023 · 1 comment

Comments

@weswes
Copy link

weswes commented Oct 11, 2023

It seems not supported as I get this error:

´´´
com.mongodb.MongoCommandException: Command failed with error -1: 'Unknown error: class java.util.ArrayList cannot be cast to class de.bwaldvogel.mongo.bson.Document (java.util.ArrayList is in module java.base of loader 'bootstrap'; de.bwaldvogel.mongo.bson.Document is in unnamed module of loader 'app')' on server 127.0.0.1:57611. The full response is {"$err": "Unknown error: class java.util.ArrayList cannot be cast to class de.bwaldvogel.mongo.bson.Document (java.util.ArrayList is in module java.base of loader 'bootstrap'; de.bwaldvogel.mongo.bson.Document is in unnamed module of loader 'app')", "errmsg": "Unknown error: class java.util.ArrayList cannot be cast to class de.bwaldvogel.mongo.bson.Document (java.util.ArrayList is in module java.base of loader 'bootstrap'; de.bwaldvogel.mongo.bson.Document is in unnamed module of loader 'app')", "ok": 0}
´´´

@weswes weswes changed the title Is bulkwrite with aggregation pipeline is supported ? Is bulkwrite with aggregation pipeline supported ? Oct 11, 2023
@tresni
Copy link

tresni commented Mar 9, 2024

I just ran into this myself trying to use an aggregation pipeline with an updateMany. The problem starts here

According to the MongoDB update command reference, in 4.2 this was changed to support either a document or a pipeline, but mongo-java-server only supports a single document.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants