christkv/node-mongodb-native — Issue #436: insert does not save functions
Author: nekdolan
Created: 2011-12-09 22:19:06+00:00
State: open

From shell:
db.newtest.insert({val:[function(foo){foo.load(foo.get('name'));}]});
{ "_id" : ObjectId("4ee287ae19adb04453343337"), "val" : [ function cf__3__f_(foo) { foo.load(foo.get("name")); } ] }

Using mongoskin (which uses mongodb native)
db.collection('newtest').insert({val:[function(foo){foo.load(foo.get('name'));}]});
{ "val" : [ ], "_id" : ObjectId("4ee288829bb119653c000001") }

Any ideas?

Daniel