私は2つのコレクションを持っています:
- Post
- Comment
Post.comments = [comment1, comment2, ...]
comment.removed
ブール値です。
すべての投稿を取得したいのですcomments
が、削除されたものは除外します。OneToMany 関係を反復せずにそれを行う方法はありますか?
これが私が試したものです:
ANY comments.removed == FALSE // Posts that have at least one removed comment
ALL comments.removed == FALSE // Posts that only have unremoved comments
(SUBQUERY(comments, $x, $x.removed == FALSE).@count > 0) // Same as the first one