-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.4.5
-
Component/s: Shell
-
None
-
Environment:Mac OS X 10.8.4 / XCode 4.6.3 / Homebrew updated daily
CentOS 6.4
-
ALL
-
Using the Mongo shell, I am able to create documents whose properties should be `undefined`; these properties are printed to the screen as `null`, however, and therefore they were difficult to remove. The code that I have included below is deceptively simple, but it is distilled from production code. It indicates that there are fundamental problems in the way that MongoDB developers treat JavaScript – either they do not understand it themselves, or they do not expect others to understand it. It's obvious that Mongo's shell breaks with standards-compliant behavior in collection preallocation, for example, but this error is unacceptable. MongoDB's "untyped" nature is very useful for cleaning up messy datasets, as opposed to SQL, but in this case it actually made things much more difficult because I knew there were `null` values in there somewhere, but I couldn't actually find them.
- duplicates
-
SERVER-6102 Shell displays both 'undefined' and 'null' type as 'null'
- Closed