Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to soft delete (logical delete) for all entities in eclipselink

I researched about cascade soft delete in eclipselink and i saw we can do that with DescriptorCustomizer and AdditionalCriteria. But my problem is that i have a huge project and the customer wants to have all the records (also deleteds). I want a solution to implement this without creating too many descriptor customizer classes. I have too many relationships and that's too hard to handle that with writing sql update for all of childs.

can i cascade soft delete that for all my entities and their childs in easier way?

like image 784
Ramin Mirahmadi Avatar asked Nov 02 '22 05:11

Ramin Mirahmadi


1 Answers

Instead of trying in Java.why not handle this at database level by sql or whatever query mechanism the database supports. As this is an one off operation you may not want to spend effort in writing Java code

like image 165
Thilak Avatar answered Nov 08 '22 05:11

Thilak