Skip to content

Commit

Permalink
SHIBUI-1031: add rank to role
Browse files Browse the repository at this point in the history
  • Loading branch information
dima767 committed Dec 14, 2018
1 parent ca89a56 commit 510ec55
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,16 @@ public Role(String name) {
this.name = name;
}

public Role(String name, int rank) {
this.name = name;
this.rank = rank;
}

@Column(unique = true)
private String name;

private int rank;

//Ignore properties annotation here is to prevent stack overflow recursive error during JSON serialization
@JsonIgnoreProperties("roles")
@ManyToMany(cascade = CascadeType.ALL, mappedBy = "roles", fetch = FetchType.EAGER)
Expand Down

0 comments on commit 510ec55

Please sign in to comment.