-->
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: Collection of dependent objects question
PostPosted: Fri Jun 11, 2004 12:40 pm 
Newbie

Joined: Fri Jun 11, 2004 12:08 pm
Posts: 4
Hello,

I've got a question regarding the example from chapter 7.2 of the documentation:

<set name="someNames" table="some_names" lazy="true">
<key column="id"/>
<composite-element class="eg.Name"> <!-- class attribute required -->
<property name="initial"/>
<property name="first"/>
<property name="last"/>
</composite-element>
</set>

In this case "id" is the foreignkey to the enclosing table. Am I correct?
Is it possible that table 'some_names' has its own synthetized primary key generated by Hibernate (let's call it "name_id", Type "long")? How would this Hibernate mapping look like? Or is it not possible that a table of depending objects has such a primary key, i.e. the primary key has to be a combination of the other properties of "some_names" instead?

Regards
Oliver


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.