Mongoose aggregate method does not work
<p>I have these lines :</p>

<pre><code>            Score.find({gameId : gameId}).exec(function(err,obj){
                console.log("find length : " + obj.length);
            });

            Score.aggregate([
                {$match: {gameId: gameId}}
            ], function (err, result) {
                console.log('result is : ' + JSON.stringify(result));
                console.log('is there any error : ' + err);
            });
</code></pre>

<p>And output of these lines are </p>

<pre><code>result is : []
is there any error : null
find length : 1
</code></pre>

<p>I do not understand, why "match" method of aggregate does not work as expected - finding all documents, that match properties. I added <code>Score.find</code> with same "body" to find out, if the document really exist and it does.</p>

<p>PS : <code>{gameId: gameId}</code> - first gameId is name of property, second one is string value with ID I am looking for.</p>

<hr>

<p>PS2: fluent api having same result :</p>

<pre><code>            Score.aggregate().match({gameId: gameId}).exec(function (err, result){
                console.log('result is : ' + JSON.stringify(result));
                console.log('is there any error : ' + err);
            });
</code></pre>