• Post Reply Bookmark Topic Watch Topic
  • New Topic

Delete orphan object problem

 
michael yue
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Having problem in delete records in jsf. Is there any way to delete orphan object using jpa with hibernate. Is there a way to declare the cascade all delete orphan in the entity which can be declared in the hibernate mapping file as described below. Or do I need to implement hibernate mapping to achieve this.

'cascade="all" cascades the delete() operation from parent to child. If this is a one-to-many association, try using cascade="all,delete-orphan".'
From http://www.hibernate.org/116.html#A17
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!