| Author |
delete-orphan with hibernate annotation
|
Anand Loni
Ranch Hand
Joined: Jan 20, 2006
Posts: 150
|
|
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,
|
~ Anand,
SCJP 1.5
SCWCD 1.5
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
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?
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Anand Loni
Ranch Hand
Joined: Jan 20, 2006
Posts: 150
|
|
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
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Should be possible. Can we see your code?
|
 |
Anand Loni
Ranch Hand
Joined: Jan 20, 2006
Posts: 150
|
|
Here is the code
When I update CandidateEnrollment with new details, old details are unassociated but not deleted.
Thank,
|
 |
 |
|
|
subject: delete-orphan with hibernate annotation
|
|
|