Get ID of last inserted document in a mongoDB w/ Java driver - WITH TYPED COLLECTION

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Command Operations
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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).

            Assignee:
            Ross Lawley
            Reporter:
            Nagy László Zsolt
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: