• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why relationship?

 
Parul Patidar
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why relationship are used. can we not do same thing with entity beans having CMP fields.
for example if i have a VendorBean entity bean and a Product entity bean and if my ProductBean entity bean have a vendorId CMP field then is this case not a relationship?? or i need to keep vendorId field in ProductBean as CMR Field and declare this in deployment descriptor?
how these two are different??
 
Sujatha Ranganathan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
The idea of using CMR is that the EJB container manages the relationship for you and you dont have to explicitly manage the consistency between the two entities.
For more information on CMR refer to this tutorial.
Hope this helps.
Sujatha.
OTN Sample Code
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!