Thanks for help. I allready figure it out. It was my mistake. I hava had:
Code:
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
@JoinTable(name = "Prf_tag", uniqueConstraints = @UniqueConstraint(
columnNames = {"tag", "user" }),
joinColumns = { @JoinColumn(name = "user", nullable = false, updatable = false) },
inverseJoinColumns = { @JoinColumn(name = "tag", nullable = false, updatable = false) })
@org.hibernate.annotations.Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
public Set<Tag> getTagsSet() {
return this.tagsSet;
}
there should not be: @org.hibernate.annotations.Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
Thanks, Uros