我从 nhibernate 收到以下错误消息:
{"不是关联:ID"}
Model.Order orderAlias = null;
Model.Unit unitAlias = null;
查询重现:
var query = m_hibernateSession.QueryOver<Model.Order>(() => orderAlias)
.JoinAlias(() => orderAlias.ID, () => unitAlias, JoinType.InnerJoin)
.TransformUsing(Transformers.DistinctRootEntity)
.OrderBy(x => x.PONumber).Desc.Take(5);
(对于 DB 模型也可以在这里查看:nhibernate criteria for selection from different tables)
这是什么意思?如何正确检索我的结果列表?
谢谢