NHibernate QueryOver带有Or子查询

| 好吧,我输了。我有一个看起来像这样的NHibernate查询
  var subQuery = QueryOver.Of<Lead>()
            .Where(x => x.Client == user.Client)
            .And(x => x.LeadType == leadType && x.LeadType != LeadTypeEnum.Self)
            .Select(Projections.Distinct(Projections.Id()));
我用这个
  var query = Session.QueryOver<Lead>()
            .WithSubquery.WhereProperty(x => x.Id).In(subQuery);
这产生了我需要的
Where lead.id in (select Id from .......)
但是,我需要添加另一个子查询。像上面一样容易做,但是我需要它来产生以下内容
Where lead.id in (select id from .....)
or lead.id in (select id from .......)
问题是我总是得到以下信息
Where lead.id in (select id from .....)
and lead.id in (select id from .......)
有人可以指出我正确的方向来获取或请     
已邀请:
        我本人是NH新手,但您可能想尝试创建一个析取并向其中添加条件,然后将该析取添加到QueryOver
Where
调用中。
var disjunction = new Disjunction();
disjunction.Add(subQuery1);
disjunction.Add(subQuery2);
var query = Session.QueryOver<Lead>()
    .Where(disjunction);
    

要回复问题请先登录注册