我如何轻松地连接这张桌子,就像在图片上添加红色线一样?
老师代码:
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "user_roles",
joinColumns = @JoinColumn(name = "user_id"),
inverseJoinColumns = @JoinColumn(name = "role_id"))
private Set<Role> roles = new HashSet<>();
受训者代码具有相同的部分,并且采用第一个