【发布时间】:2011-07-15 06:20:02
【问题描述】:
我有两张桌子:
Table_A (Id1 PK, Id2)
Table_B (Id1 PK, Id2 PK, Id3 PK)
目标:
从table_b 映射到NHibernate 行集作为table_a 对象中的集合
<set name="Table_B_elements" table="Table_B" lazy="true">
<key columns="Id1"/>
<one-to-many class="Handler"/>
</set>
我可以很容易地进行类似的查询
select *
from Table_A as a
join Table_B as b on b.Id1 = a.Id2;
对如何映射有任何建议吗?
【问题讨论】:
标签: c# nhibernate orm