Adding conditions to outer joins with NHibernate ICriteria/QueryOver query

后端 未结 3 1480
北恋
北恋 2020-12-18 15:25

Is there a way to specify additional conditions on outer joins in NHibernate when querying using QueryOver or ICriteria?

I need some extra conditions on the outer jo

3条回答
  •  借酒劲吻你
    2020-12-18 15:57

    (Answered my own question - sorry!)

    Fabio answered a similar query on the NHibernate list - just thought I'd post it here.

    That is possible with Criteria since NH3.0. The feature in HQL http://fabiomaulo.blogspot.com/2009/05/nhibernate-210-hql-with-clause.html

    With Criteria have a look to CreateAlias(string associationPath, string alias, JoinType joinType, ICriterion withClause) CreateCriteria(string associationPath, string alias, JoinType joinType, ICriterion withClause)

    With QueryOver it is not available but there's a JIRA for this here: https://nhibernate.jira.com/browse/NH-2592

提交回复
热议问题