Details
-
Improvement
-
Resolution: Won't Do
-
Minor - P4
-
None
-
3.3.1
-
Server Development Platform
-
Fully Compatible
Description
Sometimes we need to determine the class of a javascript object. Currently, class membership testing can be done by prototype object comparison, but there is nothing preventing a user from overriding the __proto__ field of an object.
It would be helpful to determine the C++ className of an object in a way that cannot be overridden by a user.
We propose adding a new `mongoTypeName()` function that would return the className for an object created from a MongoDB class (e.g. NumberInt, OID, etc).