@org.hibernate.annotations.ForeignKey has been deprecated, but I cannot find any examples how the JPA 2.1 equivalent would have to look like?
@org.hibernate.annotations.ForeignKey
@ManyT
Do you insert @JoinColumn(foreignKey = @ForeignKey(name = "FK_USER")) direct to mapped to entity example:
@JoinColumn(foreignKey = @ForeignKey(name = "FK_USER"))
@ManyToOne @JoinColumn(foreignKey = @ForeignKey(name = "FK_USER")) private User user;