File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

delete-orphan with hibernate annotation

 
Anand Loni
Ranch Hand
Posts: 150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am using hibernate annotation (hibernate 3.2.5). I am not able to delete orphan objects using @Cascade( { CascadeType.DELETE_ORPHAN }). When I googled for this, I found that delete-orphan not supported for the version I am using. Even I tried with version 3.5.0. Any idea how to delete orphans ?

Thanks,

 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure I understand the question. Are you saying this annotation doesn't work with a version of Hibernate that claims to support it, or are you asking how to get this functionality in an earlier version?
 
Anand Loni
Ranch Hand
Posts: 150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,

Yes you are right. I want to delete orphan objects with the current version. Any ways to do this ?

Thanks
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should be possible. Can we see your code?
 
Anand Loni
Ranch Hand
Posts: 150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the code



When I update CandidateEnrollment with new details, old details are unassociated but not deleted.

Thank,

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic