Details
-
New Feature
-
Resolution: Won't Fix
-
Major - P3
-
None
-
2.11.3
-
None
-
rhino 1.7R5
Description
For this object (note "when" field):
var o = { |
"_id" : id, |
"when" : new Date(), |
"name" : "MongoDB" + 'def', |
"type" : "database", |
"count" : 1, |
"info" : { |
x : 203,
|
y : 102
|
}
|
};
|
This call:
new BasicDBObject(o); |
Throws the following error:
org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: can't serialize class org.mozilla.javascript.NativeDate
|
There was a similar issue with ConsString that was fixed in the latest driver build. The "name" field above should cause the ConsString instance to be passed to the function, which works. It did not in previous version of the driver.
A fix for this would be awesome.