This is my annotation I use to generate my Join Table.
@OneToMany(cascade = CascadeType.ALL)
@JoinTable(name = \"service_operations\",
joinColumns
I fixed my problem by adding the following changes:
I changed my @OneToMany to a @ManyToMany annotation
@ManyToMany(cascade = CascadeType.ALL)
@JoinTable(name = "workflow_services",
joinColumns = @JoinColumn(name = "workflow_id"),
inverseJoinColumns = @JoinColumn(name = "service_id"))
public Set getServices() {
return services;
}
I added a Set workflows; association in my Service object
@ManyToMany(mappedBy="services") // map info is in person class
public Set getWorkflows() {
return workflows;
}