-->
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: Many to many mapping
PostPosted: Wed Aug 03, 2005 1:13 am 
Newbie

Joined: Wed Aug 03, 2005 1:08 am
Posts: 8
Location: aa
How hibernate itself maintains a link table for many to many mapping, if i donot create a link table?

how would load that table , if i want to acces the associated classes?

any code example on this would be a great help....it's really urgent
i m using hibernate 2.1.

_________________
aaa


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 03, 2005 5:03 pm 
Newbie

Joined: Mon Dec 13, 2004 5:56 pm
Posts: 12
Location: Montreal, QC
As far as I know, you need to create the many-to-many table to have any sort of many-to-many attributes. I also generally create a mapping in the XML and generate a POJO, though I'm not sure if this is necessary.

A two-column table with composite keys works (I've had issues trying to use tables with other columns, or with other primary keys).

-sara


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.