I have the following tables:
@Entity
class TableA {
@Id
private String id
@ManyToMany(fetch = LAZY)
@JoinTable(name = "tablea_tableb")
private Set<TableB> tablebList;
}
@Entity
class TableB {
@Id
private String id
}
When I run my unit tests I get the join table generated properly, but it also generated referential constrains from the join table (tablea_tableb) to the source tables (tableA and tableB) with on delete restrict and on update restrict.
In our deployment the join table is created without the on delete and on update clauses. The application expects to be able to delete the source tables.
I've tried adding cascade=CascadeType.All or CascadeType.REMOVE but it always generates the on delete restrict and on update restrict clauses.
I'm currently trying use V3.1.2.
Is there away to disable this generation? Or, was this a problem with this version, but was fixed in a later released?
Thanks
Tim