[JAVA-5129] Can CRUD method options be specified as a BSON document? Created: 31/Aug/23 Updated: 01/Sep/23 Resolved: 01/Sep/23 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Aggregation |
| Affects Version/s: | 4.9.0 |
| Fix Version/s: | None |
| Type: | Question | Priority: | Major - P3 |
| Reporter: | chaoyang jia | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
| Description |
|
When using pipeline functions, options cannot be customized and can only be done through the provided methods. If I have seen options written to BSONDocument, they cannot be passed in. Is there a way to pass them in? |
| Comments |
| Comment by Jeffrey Yemin [ 01/Sep/23 ] |
|
No, there is not a way to specify options via a BSON document, nor do we have any plans to add such functionality. As a workaround, you could write a simple helper method that translates your options into method calls on AggregateIterable (we do a similar thing in one of our test harnesses). |
| Comment by chaoyang jia [ 31/Aug/23 ] |
|
I am using a pipeline, MongoCollection. aggregate (pipeline), but my options parameter is a BasicDBObject object. I cannot give options to the aggregate method, can I only use some of the options methods you provide? Methods such as comments |
| Comment by chaoyang jia [ 31/Aug/23 ] |
|
|
| Comment by PM Bot [ 31/Aug/23 ] |
|
Hi j15030047216@163.com, thank you for reporting this issue! The team will look into it and get back to you soon. |