Many to Many relationship, without Joining table

Topics: General, Writing modules
Jul 15, 2013 at 2:19 AM
Hi all,

Is it possible to define Many-to-Many relationship in Orchard, as following, without introducing any Joining Class (
<class name="NHibernate.Auction.Category, NHibernate.Auction">
    <id name="Id" column="ID"/>
    <bag name="Items" table="CATEGORY_ITEM" lazy="true">
        <key column="CATEGORY_ID"/>
        <many-to-many class="NHibernate.Auction.Item, NHibernate.Auction" column="ITEM_ID"/>

<class name="NHibernate.Auction.Item, NHibernate.Auction">
    <id name="id" column="ID"/>

    <!-- inverse end -->
    <bag name="categories" table="CATEGORY_ITEM" inverse="true" lazy="true">
        <key column="ITEM_ID"/>
        <many-to-many class="NHibernate.Auction.Category, NHibernate.Auction" column="CATEGORY_ID"/>

Tien Huat
Jul 15, 2013 at 2:20 AM
Sorry, the Subject should be "Many to Many relationship, without Joining Class"
Jul 16, 2013 at 7:18 AM
I had the same issue. but then i realized that i can live with the extra class. :)