Hi,
I have a question about how hibernate works. For example, i have 2 classes, A and B. A has n B (set), and B has one A. I use this mapping for this:
A.hbm.xml
...
<set name="as">
<key column="a_uid"/>
<one-to-many class="...B"/>
</set>
...
B.hbm.xml
...
<many-to-one
name="a_father"
class="...A"
column="a_father_uid"
/>
...
With this mapping, hibernate create into B table 2 fields, a_father_uid and a_uid, two fields contains same value in all cases.
Exists another mapping form to use the same field ???
regards
epsino
|