阅读背景:

如何在mongoose sub doc中配置默认枚举值?

来源:互联网 

I am using mongodb along with mongoose js in my node js application . I created a mongoose document schema called “CompanySchema” which is using “TeamSchema” (another mongoose document schema) as a sub document. Inside this “TeamSchema” it has an array defined as employees which is using “EmployeeSchema” (another mongoose document) as a subdocument. So my question is when I am trying to save the document “CompanySchema” the default value for requirement status “unmet” is not getting set. So can you guys explain me what I am doing wrong in here?I am using mongodb along with mongoose js in my




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: