【发布时间】:2012-12-01 16:45:41
【问题描述】:
我有一个类似于下面的类图。
我使用这个例子是因为它比解释我正在研究的领域更简单。
public class Cheque {
public FinanceAccount Account {get;set;}
public Customer customer {get;set;}
public Branch Branch {get;set;}
}
Cheque 实体与其余三个实体具有 ManyToOne 关系。
目前的关系不是双向的。
如何编写有效的期货查询来获取Cheques 的列表,这样我在加载Account、Customer、Branch 时就不会得到N+1?
我尝试过使用左连接,但想知道这是否可以使用简化的 SQL 来完成
【问题讨论】:
标签: nhibernate nhibernate-futures