• Post Reply Bookmark Topic Watch Topic
  • New Topic

Entity Beans Many-Many relationship

 
Nitin Parashar
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

HFEJB just talks about one-one and one-many relationships between two entity beans. Just wondersing how can a many to many relationship between two entity beans be implemented?

The primary keys of two tables are mapped in a third table. So is it correct that we have to create a third entity bean which will act as a link between two entity beans with many-many relation.

Thanks
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[b]The primary keys of two tables are mapped in a third table. So is it correct that we have to create a third entity bean which will act as a link between two entity beans with many-many relation.[b]

Please find an example of a many-to-many relationship between two EJBs here
 
If you are using a rototiller, you are doing it wrong. Even on this tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!