モデル「File.js」でこれを定義しました:
var FileSchema = new Schema({
_id : ObjectId
name : String
});
そして「Folder.js」では:
var FileSchema_Folder = new Schema({
_id : ObjectId // <--- is good practice to keep this id here?
name : String
});
var FolderSchema = new Schema({
_id : ObjectId
files : [FileSchema_Folder] // <--- UPDATE: replaced FileSchema for FileSchema_Folder
});