-->
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.  [ 3 posts ] 
Author Message
 Post subject: is a one way many-to-one relation possible?
PostPosted: Wed Mar 15, 2006 11:50 am 
Regular
Regular

Joined: Fri Feb 03, 2006 5:28 pm
Posts: 73
Location: Québec, QC, Canada
Hi,

I have an order class which has a collection of OrderItem.
OrderItem has property such as Quantity, PriceSnapShot and a property of type CatalogItem which refer to an item.

So a CategoryItem can be in many OrderItem
and an OrderItem have one and exactly one CategoryItem.

It makes sense to add a many-to-one element in my OrderItem mapping file, right?

but do I have to put a bag element in my CategoryItem if I don't need to navigate from a CatalogItem to my OrderItem?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 16, 2006 3:44 am 
Senior
Senior

Joined: Thu Aug 25, 2005 3:35 am
Posts: 160
afaik, you should only model the relations that you want. So the answer would be: no ;-)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 16, 2006 7:52 am 
Regular
Regular

Joined: Fri Feb 03, 2006 5:28 pm
Posts: 73
Location: Québec, QC, Canada
Thank you! :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.