2
我有以下类的加入:标准API,并留下了一个词典/地图
public class Item
{
public int Id { get; set; }
public IDictionary<int, ItemLocal> { get; protected set; }
public ICollection<string> Tags { get; set; }
public int DefaultLanguageId { get; set; }
public DateTime Start { get; set; }
}
public class ItemLocal
{
public virtual Item Parent { get; set; }
public virtual int LanguageId { get; set; }
public string Title { get; set; }
public string Description { get; set; }
}
这些映射到表项,ItemTag和ItemLocal。我想要通过标准API以下查询:
select
i.Id,
i.Start,
l.Title
from
Item i
left join ItemLocal l on i.Id = l.ParentId and i.DefaultLangaugeId = l.LanguageId
order by
l.Title,
i.Id
但我不知道如何执行左侧与NHibernate的标准API加入。特别是使用默认的语言选择。
任何帮助非常感谢。