Register / Login
Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Object Relational Mapping
orphan child for Many To Many mappings
posted 2 months ago
One to one and one to many relationships, if a parent has been deleted, you can set orphanRemoval true. Will delete the orphan child.
But it seems there is to no way within JPA to remove the orphan for a many to many parent.
I feel the best way is to periodically run amother programme on the DB itself dedicated to removing orphans
Is this the best possible soultion.
When it is used for evil, then watch out! When it is used for good, then things are much nicer. Like this tiny ad:
global solutions you can do in your home or backyard
Boost this thread!
EJB 3.0 JPA & Hibernate One-to-Many leaves orphan children?
Hibernate JPA and orphan deletion
Delete orphan object problem
retrieving object hierarchy - many-to-one?
Updating child DTO object and @MapsId