Support the BSON Symbol type

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Mongo m = new Mongo();
      DBCollection collection = m.getDB("test").getCollection("temp");
      collection.insert(BasicDBObjectBuilder.start().add("char", 'c').get());
      

      Resulting to:

      Exception in thread "main" java.lang.IllegalArgumentException: can't serialize class java.lang.Character
           at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:234)
           at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:140)
           at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:86)
           at com.mongodb.DefaultDBEncoder.writeObject(DefaultDBEncoder.java:27)
      ...
      

            Assignee:
            Unassigned
            Reporter:
            Uladzimir Mihura (Inactive)
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: