-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
Eval JS Function = mc={m:function () { emit(
{hid:this.hid}, this.vt); }}
Exception in thread "main" java.lang.UnsupportedOperationException: can't handle CODE yet
at org.bson.BSONDecoder.decodeElement(BSONDecoder.java:165)
at org.bson.BSONDecoder.decodeElement(BSONDecoder.java:181)
at org.bson.BSONDecoder.decode(BSONDecoder.java:71)
at org.bson.BSONDecoder.decode(BSONDecoder.java:55)
at org.bson.BSONDecoder.decode(BSONDecoder.java:42)
at com.mongodb.Response.<init>(Response.java:70)
at com.mongodb.DBPort.go(DBPort.java:81)
at com.mongodb.DBPort.call(DBPort.java:57)
at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:181)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:277)
at com.mongodb.DBCollection.findOne(DBCollection.java:366)
at com.mongodb.DBCollection.findOne(DBCollection.java:355)
at com.mongodb.DB.command(DB.java:135)
at com.mongodb.DB.doEval(DB.java:148)
at com.mongodb.DB.eval(DB.java:157)
...
Adding another statement before emit worked.
mc={m:function() {var test=""; emit(
{hid:this.hid}, this.vt);}}