-->
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: Hibernate mapping
PostPosted: Tue Jul 08, 2008 7:44 am 
Newbie

Joined: Fri May 16, 2008 11:48 am
Posts: 3
I need to map collection like this:

Code:
Map<Key, List<Value> > myMap;


And I have no thoughts how to do is... In my project I use hibernate annotations, so it would be better to use them. Thanks for your help.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 08, 2008 9:56 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Just break it down...

What are the objects? What are the relations between them? Many to one? One to many? Many to many?

Then apply the varius mappings one at a time.

Here are some great tutorials on mapping associations:

http://jpa.ezhibernate.com/Javacode/lea ... sociations

Good luck!

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


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