sorry. i was looking at the CHM and not my code:
Quote:
NHibernate Class Library - v.1.0.2.0
NotNullExpression Class
An ICriterion that represents "not null" constraint.
For a list of all members of this type, see NotNullExpression Members.
System.Object
NHibernate.Expression.AbstractCriterion
NHibernate.Expression.NotNullExpression
public class NotNullExpression : AbstractCriterion
Thread Safety
Public static (Shared in Visual Basic) members of this type are safe for
multithreaded operations. Instance members are not guaranteed to be
thread-safe.
Requirements
Namespace: NHibernate.Expression
Assembly: NHibernate (in NHibernate.dll)
it really should be:
Code:
criteria.Add(Expression.Eq("Ativo", "1"))
.Add(Expression.IsNotNull("Pedido")) // Pedidio is NOT NULL
.SetFetchMode("Pedidos", FetchMode.Join)
.AddOrder(Order.Asc("NomeFantasia"))
.SetResultTransformer(CriteriaUtil.DistinctRootEntity);