如题,就是文档中真的没有看到。 已经看了好几遍了
来自炫酷的 CNodeMD 越来越喜欢material design😁
回复 (5)
X
引用 eqiunoexec()返回了promise对象,你可以直接用的. In mongoose 4, a Query has a .then() function, and thus can be used ...
@eqiuno 我的意思就是这个promise解决之后的数据后,是原生的js对象,还是mongoose包装过的。我在文档中并没有找到相关的内容
Z
例如:Model.find({},function(errr,doc){ } ), 其中 doc 具有 document 方法的。比如 doc.save(); 又再跟 var user = new User() ; user.save() 相似。我觉得就是返回 Model 实例。
X
@nswbmw 这个包装过的对象在mongoose文档里有没有提及?
E
exec()返回了promise对象,你可以直接用的.
In mongoose 4, a Query has a .then() function, and thus can be used as a promise.
参与回复
登录后即可参与回复。登录