Thank you very much!
FundCompany table mapping:
<class name=”com.fundback.datebase.FundCompany” table=”FundCompany” schema=”dbo” catalog=”FundDb”>
<id name=”companyId” type=”java.lang.String”>
<column name=”CompanyId” length=”20″ />
<generator class=”assigned” />
<set name=”funds” inverse=”true”>
<key>
<column name=”CompanyId” length=”20″ not-null=”true” />
</key>
<one-to-many class=”com.fundback.datebase.Fund” />
</set>
private Set funds = new HashSet(0);
FundCompany is main table,
funds is FundCompany of outside table.
they own the same row ,when main table update value,the relevant row of outside table update the same value.
the mapping is one-to-many.
This function can be realization in hibernate?