thinkjs / thinkjs

Use full ES2015+ features to develop Node.js applications, Support TypeScript.
https://thinkjs.org/
MIT License
5.31k stars 616 forks source link

mongodb 的 字段过滤无效,fieldReverse 功能反了 #591

Closed aov2005 closed 7 years ago

aov2005 commented 7 years ago

DESC

mongodb的rest方法中

__before(){
        this.modelInstance.fieldReverse('password');
    }

就只过滤出password字段,其他字段排除了

ENV

Platform:

Node.js Version: 7.7

ThinkJS Version: 2.2

welefen commented 7 years ago

mongodb 下因为拿不到所有的字段,所以不支持这个方法。

aov2005 commented 7 years ago

感谢答疑

guohuihot commented 5 years ago

有解决方案吗?

lizheming commented 5 years ago

@guohuihot 拿出所有数据后手动过滤下吧