-->
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: Need help with networked relationship
PostPosted: Mon Apr 04, 2005 7:52 pm 
Newbie

Joined: Mon Apr 04, 2005 7:33 pm
Posts: 3
I'm new to Hibernate but I have read two books on the subject. Book learned doesn't mean success so I'm trying to demonstrate hibernate with a real world example. I'm using Hibernate version:2.1 and I'm trying to understand how to define a networked relationship. For example:

---------------------
| PART |
| PK PART_ID |
| S PART_NAME |
---------------------
| |
| |
\/ \/
---------------------
| COMPONENT |
| FK ASSY_PART |
| FK COMP_PART|
| S REF_DESIG |
---------------------

Where all parts in an assembly are listed using the ASSY_PART = PART_ID and the COMP_PART references the actual part on the assembly.

I'm not sure what <set> assignments shold be in which objects. I need to have a component object because it has the customized information of the part assignment to an assembly instance. So I expect to have a PART and COMPONENT object. I'm not sure from the examples where the <set> assignments belong.

Any suggestions would be helpful.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 04, 2005 7:58 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
This is a simple parent child relationship.
More reading - see http://www.hibernate.org/hib_docs/reference/en/html/example-parentchild.html

For some detailed information.


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.