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

Support the BSON Symbol type

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: BSON
    • Labels:
      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 Unassigned
            Reporter:
            uladzimir_mihura@epam.com Uladzimir Mihura
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: