Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 M5
    • Fix Version/s: 1.0 RC1
    • Component/s: Mapping
    • Labels:
      None

      Description

      public class A<T> implements Serializable {
      
      	private String valueType;
      	private T value;
      
      	public A(T value) {
      		this.valueType = value.getClass().getName();
      		this.value = value;
      	}
      }
      
      Map<String, A<String>> objectToSave = new HashMap<String, A<String>>();
      objectToSave.put("test", new A<String>("testValue"));
      
      A<Map<String, A<String>>> a = new A<Map<String, A<String>>>(objectToSave);
      DBObject result = new BasicDBObject();
      
      converter.write(a, result);
      
      { "_id" : ObjectId("4ebbae36d0ab5ef4ac6b0533"), 
        "_class" : "foo.bar.A", 
        "valueType" : "java.util.HashMap", 
        "value" : { "_class" : "java.util.HashMap", 
                    "threshold" : 12, 
                    "loadFactor" : 0.75 } 
      }
      

        Attachments

          Activity

            People

            • Assignee:
              olivergierke Oliver Gierke
              Reporter:
              olivergierke Oliver Gierke
              Last updater:
              Trevor Marshall
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0d
                0d
                Logged:
                Time Spent - 40m
                40m