I’m using postgres with my spring boot app and I want to make a specific table not delete able by anyone. Is there a way to implement this on spring boot side.
Revoking delete grant does the job on postgres side but I want to configure entity such that it won’t be delete able by anyone.
2
Answers
Create a trigger on the table to prevent deletion:
See live demo.
If you use JPA you could overload the delete methode from the Repository. None is then able to delete entries over it.