[JAVA-2491] Clarify "upserted items" in javadoc for BulkWriteResult.getUpserts() Created: 13/Apr/17 Updated: 10/Jun/23 |
|
| Status: | Backlog |
| Project: | Java Driver |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Mark Helmstetter | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | roadmap | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Quarter: | FY24Q2 |
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
| Description |
|
The javadoc for BulkWriteResult.getUpserts() says Arguably, "upserted items" is a bit ambiguous as a user might expect that to be populated when there's an update. The mongo shell documentation for https://docs.mongodb.com/manual/reference/method/BulkWriteResult/#BulkWriteResult.upserted is a little more specific, as it states: |
| Comments |
| Comment by Jeffrey Yemin [ 10/Jun/23 ] |
|
Just FYI, the server's update command does not include the list of updated _id values (nor the list of deleted _id values for the delete command. |
| Comment by Almog Tavor [ 16/Sep/22 ] |
|
I agree with Sam. That's not what the user would want/expect. And if so, where would a user be able to find the updated ids? |
| Comment by Sam Peretz [ 12/Jan/18 ] |
|
Why doesn't BulkWriteResult include both updated ids as well as inserted ids? It should have getUpdated() that returns the former and getInserted() that returns the latter. Or, at the very least, getUpserted() should return both updated and inserted ids. |