-->
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: Two ways to model ownership relationship
PostPosted: Thu Mar 31, 2005 9:22 pm 
Regular
Regular

Joined: Wed Aug 25, 2004 7:40 pm
Posts: 65
In my learning Hibernate process, I have seen two way to model the ownership relationship with Hibernate. In the case of Person and Cat, we can have

Class Person { Integer id; ...}
Class Cat { Integer id; Person owner; ... }

or

Class Cat { Integer id; Integer owner; ... }

The mappings are different. Where are the pros and cons of these two approaches?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 01, 2005 1:51 pm 
Regular
Regular

Joined: Wed Aug 25, 2004 7:40 pm
Posts: 65
Anyone?


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.