Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Many-Many Relationships : EJB-CMP

 
Aleena Rehman
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do we manage many-many relationships ? In HFEJB, we have only examples of one-one, one-many and many-one?

In database terms, we resolve it by having an XRef table, that has relationships of one-many and many-one.
For example:
Actor(0..m) <- -> (0..n) Movies
(1) An Actor has worked in many movies.
(2) A Movie has many actors.

At database end, we will have an Actor_Movie table in addition to the above two tables.
So we will have the following resolved relationships
Actor [0..1] [0..m] Actor_Movie [0..n] [0..1] Movie

how will we define a descriptor for this ?

Any help will be appreciated .
Regards
Aleena
 
Aleena Rehman
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can any body help ?
Thanks in advance
 
Prashant Tejura
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For M:N Relationship in Entity Beans:-
Please refer Page 337 of Mastering EJB (2nd Edition NOT 3rd Edition)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic