ååã«å¼ãç¶ããä»åã¯ãµãããã¥ã¡ã³ãã¨ãªãã¡ã¬ã³ã¹ã«ã¤ãã¦ã§ããMongoDBã§ã¯Embedding and Linkingã¨ãã¦è§£èª¬ããã¦ãããJoinãæããªãMongoDBã®è¨è¨ææ³ã®ï¼ã¤ã¨ãã¦ãã使ããã¾ãã 2. sub-docs Mongooseã§ã¯Schemaãå®ç¾©ãã¦ããã¥ã¡ã³ããæä½ãã¾ãããå¥ã®ããã¥ã¡ã³ãé
åãSchemaã®ä¸é¨ã¨ãã¦ä¿æãããã¨ãã§ãã¾ãã以ä¸ãããã¾ã§ä½¿ç¨ãã¦ããuserSchemaã«histSchemaã¨ããããã¥ã¡ã³ããæããã¾ããã // SubDocument Schema var operations = 'create,submit,cancel'.split(','); var histSchema = mongoose.Schema({ operation : { type: String, enum: operations },
{{#tags}}- {{label}}
{{/tags}}