• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

several questions regarding CMR

Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. When I have a relationship between two entity beans: Bean A has a one to one relation with Bean B, and I do not specify a CMR field on both sides of the relation. So neither of my <ejb-relationship-role's> contain a <cmr-field>. Is this valid ? Its pretty useless since you cannot access the relation...but the spec does not says anything about this ?

2. Assume the same relation as in '1', but now I specify a CMR field in bean B. So its possible to from bean B to bean A buth not the other way around. Next, I put the <cascade-delete> option with bean B. Is the container still able to delete bean B when I remove bean A ? The container cannot use the CMR getter on bean A to get Bean B, but then again maybe the container uses the foreign key directly...

3. Are foreign keys mapped to abstract accessor methods in the entity bean class ? I know you should not use them (instead use the CMR get/setters) but do they still appear in the bean class ?

any comments on these questions are highly appreciated !
    Bookmark Topic Watch Topic
  • New Topic