如何将以下hql转换为Criteria API
var criteria = this.Session.CreateQuery("select m, m.Attachments.size from AdvanceMessage m");
?
谢谢
最佳答案
您的问题有点含糊,但这是这样的:
IList<AdvanceMessage> list = session.CreateCriteria(typeof(AdvanceMessage))
.List<AdvanceMessage>();