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

MapPropertyCodecProvider prevents custom extension

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • 3.6.3
    • None
    • None

    Description

      Hi, our old custom ORM supported pojos with Maps with non-string keys, IF it was a ObjectId or if it was an enum (because both are rather easily converted to and from string).

      The standard ORM model does not allow this and requires the key to be a String (MapPropertyCodecProvider).

      Which is fine, but it throws an exception if the key is not a String. This prevents me from making a custom PropertyCodecProvider. Since the MapPropertyCodecProvider is higher up the chain...

      I think MapPropertyCodecProvider should not throw an exception if the map key is not a string, and just pass it on to other PropertyCodecProvider.

      Attachments

        Activity

          People

            ross@mongodb.com Ross Lawley
            jessevanhouten Jesse van Houten
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: