mongo发现里面航行本地不工作

我正在尝试直接在mongo上使用sails本地适配器进行查询。 尽pipedb中有文档,但是我没有得到任何结果。 直接水线查找function返回文件。 不过,我想使用本机查找其他目的,并试图使其工作。 有什么build议么? 下面的输出:null []。

User.native(function(e,collection){ collection.find({phoneNumber:mPhoneNumber}).toArray(function(e,r){console.log(e,r);}); 

有效。 似乎orm本地不查询时转换string格式的数字为整数。 使用parseInt将mPhoneNumber转换为整数,它工作。

这里是更新后的代码User.native(function(e,collection){collection.find({phoneNumber:parseInt(mPhoneNumber)})。toArray(function(e,r){console.log(e,r);}) ;