Hi all,
I have here the tables accounts (with UserID) and customers (with CompanyID). Both of these are linked with a many-to-many table account_customers. Therefore I currently have this mapping:
Code:
<class name="User" table="Accounts">
<id column="ID" name="name"/>
<property column="Email" generated="never" lazy="false" name="email"/>
<set name="companies" sort="unsorted" table="Account_Customer" lazy="false" batch-size="3">
<key column="User_ID"/>
<many-to-many class="Company" column="Company_ID" unique="false"/>
</class>
Actually now I need an extra column "primary" in the account_customer tabel. This column is just data and not a foreign key.
Now, could anyone explain to me how I can pull this field into the property "primary" of my Company class?
Thank you,
Steven