christkv/node-mongodb-native — Issue #381: Object member function serialization
Author: tikonen
Created: 2011-10-24 14:36:11+00:00
State: open

Hi, this is more a question than issue, but recently I noticed that driver has started to write object function properties to the database as serialized strings. For example driver would serialize 'some' in this example object:

var obj = {}
obj.some = function(a) { return a; }

Is there reason why functions are serialized to the DB? Could this be optional feature as the use case may not be very typical? Also, how the functions would be deserialized from DB?

Thanks