• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Confirmation required

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
cascade-delete can be used for One to many and one to one relationship only.
cascade-delete cannot be used for many to many relationships

Thanks
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is right.


<cascade-delete/>
In many situations child data has no meaning without parent data. If a parent is deleted from the system then the child record(s) should also be deleted. This behavior can be specified using the <cascade-delete/> tag. The tag can only be assigned to a child entity bean with a multiplicity of one or many that has a parent with a multiplicity of one. Therefore it can only be assigned to the child of a 1:1 or 1:M relationship. You can�t cascade-delete a child of a many-to-many relationship.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic