This week's book giveaway is in the JDBC forum.
We're giving away four copies of SQL Antipatterns: Avoiding the Pitfalls of Database Programming and have Bill Karwin on-line!
See this thread for details.
The moose likes JSF and the fly likes Delete orphan object problem The Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Delete orphan object problem" Watch "Delete orphan object problem" New topic
Author

Delete orphan object problem

michael yue
Ranch Hand

Joined: Nov 20, 2003
Posts: 204
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
 
 
subject: Delete orphan object problem
 
aspose file troubles