Mongoose ODM: NumberInt is not defined
<p>MongoDB collection "test" contains a record:</p>

<pre><code>{ "_id" : ObjectId("56f53cded3095c203024a884"), status : 0 }
</code></pre>

<p>I was connected to mongo by Node.js (Mongoose driver). Define schema for this collection:</p>

<pre><code>"Test" : {
    status : { type : Number, default : 0 }
}
</code></pre>

<p>Field "status" is a binary flag, must be store only 0 or 1 number value. I wanna change this flag with update query:</p>

<pre><code>test.update( { 'status' : 0 }, { $bit : { 'status' : { xor : NumberInt(1) } } }, function( err, result ) {
    if( err ) {
        console.log( 'err' );
    }
});
</code></pre>

<p>Mongoose was not found <code>NumberInt()</code> function:</p>

<pre><code>ReferenceError: NumberInt is not defined
</code></pre>

<p>When i put simple number "1" without function <code>NumberInt()</code>, i not have any changes or errors.</p>

<p>In MongoDB shell thats query worked perfectly. How i can work with <code>NumberInt()</code> in Mongoose driver? Is it have another name?</p>