Beginner |
|
Joined: Fri Mar 05, 2004 11:14 am Posts: 38 Location: Houston, Texas
|
I wonder when specifying a one-to-many I have something like
<set
name="Values"
order-by="DATA_VALUE"
<key column="NAME"/>
<one-to-many class="com.xyz.hibernate.model.Value"/>
</set>
Why is Hibernate not using/allowing to specify the FK as the property name instead of the column name ?
In the many-to-one or one-to-one there is an option of specifying the association to the fk as a property name and not a column name.
This is not a problem - I just wonder why ? Historic ?
So the above eaxmple could be spcified as
<set
name="Values"
order-by="DATA_VALUE"
<property-ref="serialName"/>
<one-to-many class="com.xyz.hibernate.model.Value"/>
</set>
|
|