views:

84

answers:

1

I have 2 tables having many to many relation and hence there is junction table to resolve this like... Table1, Table2 and Junction table name Table1Table2 having Foreign key of Table1 and Table2 and both are composit key here is what I am doing and getting exception

<class name="Table1Table2" table="Table1Table2" lazy="true">
<many-to-one name="Table1" column="Id" class="Table1"/>
<many-to-one name="Table2" column="Id" class="Table2"/>

is the above schema right?

Thanks