add RbacRoleEntity.roleName as computed column

This commit is contained in:
Michael Hoennig 2022-08-03 08:52:45 +02:00
parent ece36209a5
commit dc6445544a

View File

@ -4,6 +4,7 @@ import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import org.hibernate.annotations.Formula;
import org.springframework.data.annotation.Immutable; import org.springframework.data.annotation.Immutable;
import javax.persistence.*; import javax.persistence.*;
@ -33,4 +34,7 @@ public class RbacRoleEntity {
@Column(name="objectidname") @Column(name="objectidname")
private String objectIdName; private String objectIdName;
@Formula("objectTable||'#'||objectIdName||'.'||roleType")
private String roleName;
} }