When you do something like this in Mongo 2.6 db.test.insert({a : 1, b : [2, 3]}) you will get { "_id" : ObjectId("..."), "a" : 3, "b" : [2, 3]}. Nothing unexpected.
When I was doing similar through php in Mongo 2.4.10 with 1.4.5 driver:
$test->insert([
'a' => 1,
'b' => [2 ,3]
])
I was still getting the same normal numbers. But when I do something like this in Mongo 2.6.0 the result is different:
{
"_id" : ObjectId("534a...567"),
"a" : NumberLong(1),
"b" : [
NumberLong(2),
NumberLong(3)
]
}
As you see the numbers are converted to NumberLong. Also that's the same integer (only it can be much bigger), I do not want this behavior, because a) it is longer to read in the shell, b) all my numbers are below 100000 and therefore there is no point to have numberLong there.
I am using php 5.5.10 with mongoDriver 1.5.1