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: Design / mapping question
PostPosted: Fri Jul 17, 2009 1:52 pm 
Newbie

Joined: Fri Jul 17, 2009 1:35 pm
Posts: 3
I am fairly new to Hibernate and have some questions surrounding design and implementation. A simplified description of what I would like to persist is the following: A User contains a list of Items. Each Item has a parent id pointing to a parent Item. Each Item can be related to many users (many-to-many). Each Item can have multiple parents for the same User. I have built the following tables: User (id, username, List<Item>), Item(id, name), User_Item(user_id, item_id, parent_id).

I guess my question is how to map this via hibernate mappings to get the desired relationships in the created pojos?

Any guidance would be greatly appreciated.

Geoff


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.