i have a problem with a query from NodeJS to MongoDb (i'm using native client).
Basically, i got 2 different results when performing the query from mongo console and from node app. (with native mongo client : i'm not using mongoose or other modules )
this is my query object (im using collection.find() ):
{ 'stats.campaign_id': 6010108824797,
'stats.collectDate': { '$gte': 1375628400, '$lt': 1375632000 } }
Basically, the response from the Node app seems to be relative to only the first part of the query object ( campaign_id ) : stats.collectDate isn't taken in account. (i get ALL the records relative to stats.campaign_id : result length > 100 )
From the mongo console, the query work as expected : results are filtered by stats.collectDate (results lenght = 3 ).
Do somebody know how to make the query works also from my node app, possibly without using different modules ? And , what are the difference between mongoconsole and mongo node driver ?
Many thanks in advance