title: Why mongodb stores some numbers as NumberLong?
body: <p>Mongodb is installed on Windows 8 and I use <code>spring-data-mongodb</code> to work with it.
  I have collection with field <code>pId</code>, it's a number.
  I see strange situation, mongodb stores some <code>pId</code> as simple number but some of them as <code>NumberLong</code>.</p>
  
  <p>query:</p>
  
  <pre><code>db.mycollection.distinct("pId", {"dayDate" : { "$gte" : ISODate("2015-04-14T00:00:00.000Z")}})
  </code></pre>
  
  <p>output:</p>
  
  <pre><code>[ 61885, 61886, NumberLong(61887) ]
  </code></pre>
  
  <p>Why it happens and may I change something to use the same data type for all <code>pId</code> values?</p>