Class PrivilegeValueConverter
java.lang.Object
hu.rts.mike.example.dev.crm.security.PrivilegeValueConverter
public class PrivilegeValueConverter
extends Object
implements jakarta.persistence.AttributeConverter<Privilege,String>
Workaround required to make Privileges extendable between Mike Generations. Otherwise, Hibernate
would create a database level check what fixes the accepted values of Privilege enum in Roles
table. Which is problematic because Hibernate and Spring Data do not update this database level
check during DDL schema update process. With this AttributeConverter Hibernate do not create this
problematic the database level check.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PrivilegeValueConverter
public PrivilegeValueConverter()
-
-
Method Details