-
카테고리
-
세부 분야
풀스택
-
해결 여부
미해결
ref부분이요..
20.09.30 15:16 작성 조회수 106
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를 붙이나요??? |
답변을 작성해보세요.
2
답변 1