我有这堂课:
public Customer
{
public int CustomerId {get;set;}
....
public List<Order> OrderList {get;set;}
}
我想使用 NHibernate CreateSQLQuery 编写这个 SQL 查询
SELECT C.CustomerId, .... O.OrderId, O.OrderDate, O.OrderTotal.....
FROM Customers C
LEFT OUTER JOIN Orders O ON C.CustomerID = O.CustomerID
我如何使这种转换工作:
.SetResultTransformer(Transformers.AliasToBean<Customer>())
它是否包含每个客户对象中的订单列表?
谢谢