-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Why column in one-to-many but property-ref in many-to-one
PostPosted: Tue Apr 06, 2004 9:28 am 
Beginner
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>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.