-->
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.  [ 4 posts ] 
Author Message
 Post subject: Why is a join table better than a join column for OneToMany?
PostPosted: Mon Dec 18, 2006 10:00 am 
Newbie

Joined: Mon Dec 18, 2006 9:50 am
Posts: 2
It is described here: http://www.hibernate.org/hib_docs/annot ... ollections

The only advantage I see to join tables are that your basic entities don't change themselves to reflect the relationships they are in. However, aside from the fact that this can be considered a drawback, doesn't the join column approach perform better (faster) than the recommended join table approach?

Thanks,

------
Amit Kasher


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 18, 2006 2:12 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
you are correct. Cleaner model vs faster design

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 19, 2006 3:34 pm 
Regular
Regular

Joined: Thu Jul 29, 2004 11:55 pm
Posts: 75
How would you make this bi-directional?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Dec 20, 2006 7:21 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
@OneToMany(mappedBy="...")

_________________
Emmanuel


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