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

Ignore idProperty for embedded classes

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: POJO
    • None

      class Node {
        id: long
        left: Node
        right: Node
      }
      

      The id field will be converted to _id by annotations.
      Consider ignoring the idProperty when encoding/decoding the embedded Nodes.

      Relies on the context of the encoding / decoding to be known and handled by the PojoCodec.
      It requires, some mechanisim to opt-into, so to prevent it being a breaking change.

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            ross@mongodb.com Ross Lawley
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: