mongoose“填充”意味着什么
所以一般是什么“ 填充 ”? 指的是对数据库的一些操作。
我以前听说过,但从来没有听错
如果你有一个文件指向另一个文件(即包含一个ID引用),填充将获取引用的文件。
例如,如果你有:
{ "__id" : "a", "className" : "astroPhysics", "teacher" : "b" }
和
{ "__id" : "b", "teacherName" : "John Smith" }
得到a
活力的teacher
会给出以下结果:
{ "__id" : "a", "className" : "astroPhysics", "teacher" : { "__id" : "b", "teacherName" : "John Smith" } }