This is my abstract father:
@MappedSuperclass
public abstract class AbstractEntity implements Serializable {
@OneToMany(fetch = FetchType.LAZY)
@JoinColumn(name = "entity_no", referencedColumnName = "MY_COLUMN")
private Set<CLASS_TYPE> list;
}
All my entities has this set, but each entity has different referencedColumnName.
Is there a way to override only the @JoinColumn annotation?
You can use AssociationOverride annotation. In your case it would look like this: