The moose likes Object Relational Mapping and the fly likes Hibernate many-to-many mapping Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "Hibernate many-to-many mapping" Watch "Hibernate many-to-many mapping" New topic
Author

Hibernate many-to-many mapping

Jiale He
Greenhorn

Joined: Sep 08, 2010
Posts: 3
I am one of hibernate user in Australia. Recently, I have been dealing with hibernate many-to-many mapping and not going well though.
I got in trouble with "join/associate table with extra columns mapping".


Let`s say there are three tables called Product Order and OrderProduct (includes extra column quantity). Product holds many-to-many relationship with Order.

My confusion is that do we have to consider both ends of associate table when we are writing mapping files? or just write either side?
Also, is it necessary to produce mapping file for the associate table as well?

Any suggestions will be appreciated!!!
vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

Jiale He wrote:or just write either side?!!!
check the below links ...

sample

sample2

VIJINDAS
Jiale He
Greenhorn

Joined: Sep 08, 2010
Posts: 3
vijin das wrote:
Jiale He wrote:or just write either side?!!!
check the below links ...

sample

sample2



Thank you very much
 
 
subject: Hibernate many-to-many mapping
 
MyEclipse, The Clear Choice