With the following:
@ManyToOne(cascade=CascadeType.REMOVE)
@JoinColumn(name="INSTITUTION_ID")
public void setInstitution(final Institution institution) {
this.institution = institution;
}
Does this mean that deleting the User object will delete the associated Institution object? If so, I do not understand why this is necessary. Say, for example, that an institution had many users. Does this mean that deleting one of these users removes the institution, in which case all other users also lose it?
source
share