我搜索了一会儿,我找到了一个vi模式,但我不知道如何在ModeDevelop中启用它(从Unity打开).
我有一个关于嵌套Mongoose模式的问题.
这是一个简单的代码片段
var aSchema = new Schema({bar: String});
var bSchema = new Schema({a: aSchema, foo: String});
var cSchema = new Schema({as: [aSchema], foo:String});
Run Code Online (Sandbox Code Playgroud)
这将引发TypeError的bSchema:TypeError: Undefined type at 's' Did you try nesting Schemas? You can only nest using refs or arrays.,但工作得很好cSchema.
只是想问为什么bSchema不起作用.在Mongoose doc中找不到解释.谢谢.