I need to implement SoftDelete functionality in Spring boot 3.
Here, I need to achive the below.
For example let’s say I have Product and Order tables(Entities) which has OneToMany relationship between Oder and Product.
- Delete records in soft manner both Product and Order.
- Retrive all records (with deleted records as well), both Product and Order.
- Retrieve all Order records with Product objects even though the Product is soft deleted.
How can I implement this? I did a lot of googling, ChatGPT, and gemini as well.
Didn’t find a workable solution.