[JAVA-1939] Support automatically setting _id in Upserts. Created: 27/Aug/15  Updated: 14/Jan/19  Resolved: 14/Jan/19

Status: Closed
Project: Java Driver
Component/s: Codecs
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Ross Lawley Assignee: Unassigned
Resolution: Won't Fix Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

If I have a collectible codec, we could in theory set the _id for upserts that insert by automatically including it in $setOnInsert.

Would require a change to CollectableCodec so that the `_id` generation is publicly accessible and doesn't rely on an document instance.


Generated at Thu Feb 08 08:55:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.