Inflearn Community Q&A
ref부분이요..
Written on
·
167
0
| comments: [ | |
| { | |
| post_id: { | |
| type: mongoose.Schema.Types.ObjectId, | |
| ref: "posts", | |
| }, | |
| comment_id: { | |
| type: mongoose.Schema.Types.ObjectId, | |
| ref: "comments", | |
| }, | |
| }, | |
| ], | |
| posts: [ | |
| { | |
| type: mongoose.Schema.Types.ObjectId, | |
| ref: "posts", | |
|
},
위의 ref부분들은 참조인데 왜 s를 다 붙이나용? s붙은건 없지 않나요?
const Post = mongoose.model('post', PostSchema);
const Comment = mongoose.model('comment', CommentSchema);
다 post, comment 로 내보낸 걸로 알고 있는데 왜 s를 붙이나요??? |
reactexpressnodejsbootstrapreduxmongodb





