Hi,
i´m using Hibernate 2.1.8 and Microsoft SQL 2005.
I have two tables with one-to-many-relation..and a mapping looks like the following:
<class
name="Adressen"
......
<id
column="__Org_RecordNo"
name="OrgRecordNo"
type="long"
>
<generator class="identity" />
</id>
<property
column="ID"
length="8"
name="Id"
not-null="true"
type="string"
/>
......
<set name="AnsprechpartnerSet">
<key column ="AdressID"/>
<one-to-many class="Ansprechpartner"/>
</set>
</class>
If i´m right, that means, Primarykey of Adressen (__Org_RecordNo) is shown to "AdressId" of Ansprechpartner. How do i map, if want to let show "Id" from Adressen to "AdressId" of Ansprechpartner?
I think i need to add or change something inside of the <set-tag...but where and what??
THX for help
|