Browse Source

Role name: add NotBlank constraint annotation

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.4-alpha
Pekka Helenius 4 years ago
parent
commit
673cd993f4
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      bookstore/src/main/java/com/fjordtek/bookstore/model/auth/Role.java

+ 2
- 0
bookstore/src/main/java/com/fjordtek/bookstore/model/auth/Role.java View File

@ -15,6 +15,7 @@ import javax.persistence.OneToMany;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
/**
* This class implements Role entity which forms
@ -49,6 +50,7 @@ public class Role {
nullable = false,
columnDefinition = "VARCHAR(20)"
)
@NotBlank
private String name;
@OneToMany(


Loading…
Cancel
Save