我正在尝试转换这个代码:
Component(x => x.User, x =>
{
x.References(m => m.UserAccount).Columns(@"UserAccountId", @"UserAccountType");
x.References(m => m.Postman, @"PostmanId");
});回到hbm.xml,我的问题是:是所有的事情都是以我的方式做的,还是我遗漏了什么?转换代码:
<component name="User">
<many-to-one name="UserAccount">
<column name="UserAccountId"/>
<column name="UserAccountType"/>
</many-to-one>
<many-to-one name="Postman" column="PostmanId"></many-to-one>
</component>发布于 2015-03-30 11:41:54
如果需要,可以将所有流畅的nhibernate映射输出为xml。听起来比这容易多了。
https://stackoverflow.com/questions/29344279
复制相似问题