Do I understand right that it is impossible to define and store an int32 value in the mongodb javascript console? So if I want to do so a have no choice but to write a program in Java or other language with well-typed driver interface?
The only more or less clear explanation I could find is BUG #854 in mongodb's JIRA. But I just can't believe that such a simple and vital feature is avoided.