您可以在createalias中指定左外连接…
.CreateAlias("products", "p", NHibernate.SqlCommand.JoinType.LeftOuterJoin).Add(Restrictions.Eq("p.inventedName", inventedName));请注意,您正在对该列进行限制而进行了左外部连接…实质上是使其成为内部连接。如果您还希望申请人没有产品,那么您也必须检查产品是否为空。

您可以在createalias中指定左外连接…
.CreateAlias("products", "p", NHibernate.SqlCommand.JoinType.LeftOuterJoin).Add(Restrictions.Eq("p.inventedName", inventedName));请注意,您正在对该列进行限制而进行了左外部连接…实质上是使其成为内部连接。如果您还希望申请人没有产品,那么您也必须检查产品是否为空。