-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Command Operations
-
None
For typed/generic collections, the @BsonId field is not recognized and changed by the driver. It seems impossible to get the object id of the last inserted document. For details, please see: https://stackoverflow.com/questions/54362159/get-id-of-last-inserted-document-in-a-mongodb-w-java-driver-with-typed-collec
I'm asking this feature request because I did not get an answer for almost 6 months. I suppose that there is no good solution for this question other than changing the API. This change would probably be backwards compatible (I'm not 100% sure though).
- duplicates
-
JAVA-2674 POJO ID property is not populated after insert
- Closed