














@ManyToMany)。

@Entity
@Table(name = "authority", catalog = "testdb")
public class Authority implements Serializable {
@Id @Column(name = "authorityId", length = 36)
public String getAuthorityId() { ... }
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "authorities")
public Set<Role> getRoles() { ... }
}