I have the following mapping:
@Entity @Table(name = "Prequalifications") public class Prequalification implements Serializable { ... @ManyToMany @JoinTable(name = "Partnerships", joinColumns = @JoinColumn(name = "prequalification_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "company_id", referencedColumnName = "id")) private Set<Company> companies; ... }
In the @ManyToMany + @JoinTable matching relationship, is it not implicit that the association objects (here Partnerships ) are automatically saved, deleted, etc., although
by default, relationships have an empty cascade set
? The above quote was taken from Mike Keith's βPro JPA 2β.
Performance
em.merge(prequalification);
for the specified object performs , maintaining the associated partnerships without the specified types of cascades.
Is it right that this implicit cascade has ? This is not mentioned anywhere where I looked ...
source share