0
의견이있는 모든 기사를 어떻게 가져 옵니까? 나는 가지고있다 :mongodb에서 의견이있는 모든 기사를 가져 오는 방법은 무엇입니까?
class Article
include Mongoid::Document
embeds_many :comments
end
class Comment
include Mongoid::Document
embedded_in :article
end
예,이은을 가진 반대로'$ exists' (전혀이 필드가되지 않습니다 코멘트를하지 않고 그 기사를 가정의 올바른 사용법이다 빈 배열). –