想到这个,我的大脑开始受伤,是不是很简单:
@ManyToMany(mappedBy = "following", cascade = CascadeType.ALL)
private Set<User> followers = new HashSet<User>();
@ManyToMany(mappedBy = "followers", cascade = CascadeType.ALL)
private Set<User> following = new HashSet<User>();