Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-927

"deep copy" for Document

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • API
    • None

    Description

      Can you please enhance API to provide `deep copy` for a Document object.

      It was possible in version 2.x of MongoDB Java driver via this simple hack (Scala code):

      dbo.asInstanceOf[BasicDBObject].copy.asInstanceOf[DBObject]

      I'm using it in "Subset" library: https://github.com/osinka/subset2/blob/master/src/main/scala/DBO.scala#L97

      Attachments

        Activity

          People

            Unassigned Unassigned
            alaz Alexander Azarov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: