• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cascading Delete  RSS feed

 
Kodo Tan
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Need some help from the gurus.
I have gone through the specifications but do not seem to find a answer to the following query:
Query: Does EJB2.0 supports cascading delete for CMP entity beans ? For instance, if we have a entity bean that contains references to to other entity beans (like those normal cascading table relationships in db), when we delete the main bean, will the effect be cascading in nature if we use CMP ? Or do we have to use BMP and implement our own cascading feature ?
Thanks in advance !
 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
EJB2.0 supports cascade-delete. If you have a cointainer managed relation between 2 Entity beans, you may select:
"Delete Bean B, if Bean A is deleted"
Note: Plz make sure that the referenced beans has local interfaces.
------------------
Marco Barenkamp
____________________________________________
L M I N T E R N E T S E R V I C E S AG
Senior Trainer & Architect,
BEA Certified Enterprise Developer
Sun Certified Programmer for the Java2 Platform
Sun Certified Web Component Developer for the Java2 Platform
Sun Certified Developer for the Java 2 Platform
Sun Certified Enterprise Architect for the Java 2 Platform Enterprise Edition (PI)
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using CMP: If you define a realtionship between beans then you can specify that they use cascading delete.
------------------
Tom
Sun Certified Programmer for the Java� 2 Platform
Moderator of the forums:
J2EE and EJB
Other Java APIs
 
Cindy Chan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
Thanks for all the reply. 1 last question: How do we define a "cascade delete" relationship between the beans ? Is it during the deployment time ?
Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!