Preventing entries from being deleted using Hibernate

0

Is there any way I can make sure that a particular table entry in the database is not excluded?

For example, I created a usuários table in the database through the User class using the Hibernate and JPA anotations and would like the Admin user not to be excluded.

    
asked by anonymous 24.09.2014 / 19:29

1 answer

1

I think this access control of a particular user is by means of the bank you are using, for example in MYSQL:

DatabaseAccessManagementOrputsomeconditioninyourapplicationthatwhentheUserAdministratorisusingyourapplicationitisnotpossibletoexecutetheSQLcodetoremovetheregistry,forexample:

Checktoremovearecordfromatable:

    
25.09.2014 / 00:19