mongoose 可以多ID查询吗?
namelist = ["one","two"]
model.find({name:namelist},callback);
暂时用的是(只是一个例子~不知道运行起来有多少BUG)
namelist = ["one","two"];
tmpquery;
tmparray = [];
for (i in namelist) {
tmpobj = {};
tmpobj["spell"] = spell;
tmparray.push(tmpobj);
tmpquery["$or"] = tmparray;
};
model.find(tmpquery,callback);