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

several questions regarding CMR

 
Jim Janssens
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • 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 !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic