File tree Expand file tree Collapse file tree
src/main/java/org/acme/authorization_server/domain/entity Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package org .acme .authorization_server .domain .entity ;
22
3+ import jakarta .persistence .Column ;
34import jakarta .persistence .Entity ;
45import jakarta .validation .constraints .NotBlank ;
56import jakarta .validation .constraints .Size ;
910import java .util .Objects ;
1011import lombok .Getter ;
1112import lombok .NoArgsConstructor ;
13+ import org .hibernate .annotations .Immutable ;
1214import org .hibernate .annotations .NaturalId ;
1315import org .springframework .security .core .CredentialsContainer ;
1416import org .springframework .security .core .GrantedAuthority ;
@@ -31,6 +33,8 @@ public class User extends BaseAuditEntity
3133 private static final long serialVersionUID = -6086852500553674088L ;
3234
3335 @ NaturalId
36+ @ Immutable
37+ @ Column (updatable = false )
3438 @ NotBlank (message = "The Account username is mandatory" )
3539 @ Size (max = 50 , message = "The username must be 50 characters or less" )
3640 private String username ;
You can’t perform that action at this time.
0 commit comments