我现在开始使用NHibernate,但我仍然没有可测试的环境。Nhibernate初学者 - 询问方向
我想从您那里知道,有经验的研究员是否有问题将IList映射到.hbm文件中的Set。
像这样:
//c#
IList<TrechoItem> trechos_item;
<!-- xml .hbm -->
<set name="TrechosItem" table="trecho_item" lazy="true" inverse="true" fetch="select">
<key column="id_item"/>
<one-to-many class="TrechoItem"/>
</set>
或者说,在这一点:
IList<Autor> Autores;
<set name="Autores" lazy="true" table="item_possui_autor">
<key column="id_item"/>
<many-to-many class="Autor" column="id_autor"/>
</set>
这可能吗?或者我做错了什么?
我试过使用<map>
和<list>
但这些并没有给我所有的选项。
当然,我会这样做!感谢你们两位! – 2010-04-15 22:34:19