我有一个Dog
严格设置为 false 的模式,允许保存不在模式中的值。但是,我似乎无法使用点符号来设置如下值:
var dog = new Dog();
dog.name = "Barry"; // works because name is in schema
dog.notInSchema = "This should work!" // doesn't work because its not in the schema
dog.save(...)
像这样的东西确实有效:
var dog = new Dog({name : "kyle", notInSChema : "This works and saves" })
dog.save(...)
我需要在此处对架构中不存在的字段使用点表示法,我该怎么做?