Skip to content

Commit

Permalink
Showing 1 changed file with 7 additions and 0 deletions.
@@ -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)

0 comments on commit 510ec55

Please sign in to comment.