我希望休眠的ddl-auto manytomany不生成ID
我尝试了ManyToMany自动生成的joinTable
@JoinTable(
name = "t_role_resource",
joinColumns = @JoinColumn(name = "role_id"),
inverseJoinColumns = @JoinColumn(name = "resource_id")
)
@ManyToMany(cascade = CascadeType.PERSIST)
public List<Resource> getResourceList() {
return resourceList;
}
生成的中间表结果包含ID组件,我不需要。我只需要两个外键字段