This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How do I implement ternary relationships in CMP EJBs ??  RSS feed

 
Yogesh Sawant
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I have this question from 2 days now. I am stuck with a situation where I have to implement a ternary relationship between CMP entity beans. The scenario is as follows

Initially there is a group consisting of some elements.there is many to many relationship between these. like a group has many elements and an element can be a part of more than one group. I have implemented CMR fields in the group bean and the element bean so that I am able to display the relationshuips between the 2 beans.NOw the problem is that there is a third bean...an user bean...it selects a group ...and then he selects some centers from the group. This is where the problem lies. I am not able to implement the relationship where I can relate all the three.....the user bean, the group and the elements in the group.......Please someone help me out with this......A pointer to an example wud be the best...

Thanks
yogesh
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're probably going to have to create a separate CMP entity bean just to capture the other beans involved in the ternary relationship. Think primary key and however many CMR properties.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!