0
다음과 같이 내가 포스트 스키마가 있다고 가정 : 나는 다음과 같이 특정 태그를 일치하기 위해 노력하고있어MongoDB에서 임베디드 컬렉션을 검색하려면 어떻게해야합니까? 예를 들어
var Schema = new db.Schema({
title : String
, text : String
// Denormalize by using user name
, author : String
, tags: [String]
, comments: [Comment]
});
:
function getPostByTag(tag, callback) {
Post.find().where({"tags.value": tag}).run(callback);
}
을하지만 모든 것을 반환합니다. 내가 도대체 뭘 잘못하고있는 겁니까?