我有一個結構是這樣的骨架,因為一個ui可能會有多個type:然后type的骨架是這樣的:const typeSchema = new Schema({ name: { type: String }, createDate: { type: String }, updateDate: { type: String }, uId: { type: ObjectId, ref: 'User' }});那我在往 ui 中插入數(shù)據(jù)的時候該怎么寫呢,找了好久,一臉懵逼。各位大神給點思路。
mongoose 怎么插入嵌套數(shù)組?
尚方寶劍之說
2018-11-14 10:09:26