我是帆船的新手。
在MongoDB中有一个选项,默认情况下可以排除属性。
例如
var Person = new Schema({ bio: { type: String, select: false },
other: {type:String, select:true }})
var P = db.model('Person', Person);
P.findOne(function (err, p) {
console.log(p.bio) // undefined
console.log(p.other) // it will get the data from database
});
如何在sails.js中设置此选项?
这可能吗?
我搜索过但没有得到任何答案。