-
Type:
Improvement
-
Resolution: Won't Do
-
Priority:
Minor - P4
-
None
-
Affects Version/s: 3.3.1
-
Component/s: JavaScript, Shell
-
Server Development Platform
-
Fully Compatible
-
None
-
0
-
None
-
None
-
None
-
None
-
None
-
None
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).