BsonBinary subtype v4 (UUID Standard) gets converted back to Binary and not UUID

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.12.5
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      On reading UUID subtype V4 from MongoDB using mongo-java-driver 3.12.5, BsonBinary subtype v4 (STANDARD Uuid) gets converted back to Binary and not UUID.

      Line of code where this bug occurs:
      https://github.com/mongodb/mongo-java-driver/blob/master/bson/src/main/org/bson/BSONCallbackAdapter.java#L86

      Which throws mapping exception only in case of UUID v4 (and not in V3) : Causing: dev.morphia.mapping.MappingException: Could not map Entity with ID: org.bson.types.Binary@e1123829

      As a result, calling client is forced to add a decoding hook transformer for Binary to UUID

              Assignee:
              Unassigned
              Reporter:
              Arushi Dhunna
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: