親子クラスがあります
class Parent
{
bool Enable;
List<Child> Children;
}
class Child
{
bool Enable;
}
Enable=true のすべての親を返したいのですが、その親には Enable = true のすべての子が含まれている必要があります。
以下を作成しました
var parents = Session.QueryOver<Parent>().Where(p => p.Enabled)
.JoinQueryOver<Child>(p => p.Children).Where(c=>c.Enabled)
.List<Parent>();
正しい親 (すべて Enable=true) を返しますが、すべての子 (enable = false の場合でも) を返します。
誰かが私のクエリを修正するのを手伝ってくれますか?