-->
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: <map> and <set> with <one-to-many>
PostPosted: Mon Jan 08, 2007 3:39 pm 
Newbie

Joined: Mon Oct 17, 2005 2:55 pm
Posts: 5
Location: Toronto, Canada
Hi, Hibernate gurus.

I have actually 2 questions today, and hope to hear from you something that can open my eyes.

1. What is the specific case when we need <map> mapping than <set>? I understand if we cannot change the data model type (which has been existing) and the type is Map, then we should use it. But what else do you think?

2. In most technical documents and references, <map> and <set> mapping examples usually go together with <element> as a sub-entity tag, but very rarely I could see also <one-to-many> tag substituting a <element>. Here it confuses me why I need the tag in fact, since by thinking of Set or Map, it presumes it has a 1 to many relation already. Am I misunderstood? I wonder what will be differences or effects when <one-to-many> is used there. (Very hard to trace the source code for myself.)

I just figure out there might be a difference using 'column' attribute for <element> tag, but what would that mean?

Thanks a lot in advance.

BK

Hibernate version: 2.1.7


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.