Nhibernate beginner - asking for directions

Posted by George on Stack Overflow See other posts from Stack Overflow or by George
Published on 2010-04-15T02:37:36Z Indexed on 2010/04/15 2:43 UTC
Read the original article Hit count: 266

Filed under:
|

Hello guys.

I'm starting off with NHibernate now and I still don't have a testable environment.

I would like to know from you, experienced fellows if there is a problem to map IList to an Set in .hbm file.

Like this:

//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>

Or, in this:

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>

Is this possible? Or am I doing the wrong thing?

I tried using and but these did not gave me all the options in .

Thanks in advanced

© Stack Overflow or respective owner

Related posts about nhibernate

Related posts about c#