title: How do I save a Mongo Field Value as Long?
body: <pre><code>db.getCollection('someCollection').update({"SomeNumberField": 1},    
     { $set:
        {
          SomeNumberField: NumberLong(1)
        }
     }, { multi: true })
  </code></pre>
  
  <p>This saves "SomeNumberField" as a double. I checked the <a href="https://docs.mongodb.org/manual/core/shell-types/" rel="nofollow noreferrer">docs, and they recommend "NumberInt"</a>, which, I assume, should be an int32, but that doesn't work either. </p>
  
  <p>I am surprised I can't find info on this. </p>
  
  <p>Edit: I have tried:</p>
  
  <pre><code>SomeNumberField: NumberLong("1")
  </code></pre>
  
  <p>As in the answer <a href="https://stackoverflow.com/questions/17185220/mongodb-differences-between-numberlong-and-simple-integer">here</a>, still doesn't work.</p>