-->
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.  [ 2 posts ] 
Author Message
 Post subject: Difference between <many-to-one> and <key-many-to-o
PostPosted: Mon Mar 08, 2004 1:34 pm 
Beginner
Beginner

Joined: Fri Mar 05, 2004 11:14 am
Posts: 38
Location: Houston, Texas
Hi there

more a akademic kind of question.

In a composite-id scenario - what is the difference to use

<key-many-to-one name="a" coloumn="A"/> in the composite-id block

verus having it in a own block

<many-to-one name="a" column="A"/> ?

is it just a "flavour" and the one is as good as the other ?

B


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 08, 2004 7:23 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
You can have it in its own block of you wish but you must have it set to insert="false" and update="false" since updates to the key properties need to occur through the key itself.

The key many-to-one in most cases results in more compact mapping document.


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.