New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Templates: JPA 2.1 @ForeignKey #168
Comments
This is missing from #139. |
Using the JPA annotation
So we have to set the JPA version in |
It seems that the JPA 2.1 annotation |
With Hibernate 6 the deprecated annotation will be removed (HHH-8969). |
hello tjuerge , i'm a freshman to learn jpa. i have also meet this problem, can u tell me how to solve this ? |
Because a lot changes in Hibernate 5.2 which are preparation steps for 6 we have to make at least Enum template to recognize Hibernate > 5.2 I will try to improve generation of foreign key when 5.2 is specified. First idea is to use option |
to JPA 2.1 compliant @joincolumn(name = "COUNTRY_ID", nullable = false, foreignKey=@foreignkey(name="FK_CITY_COUNTRY_ID")) Its work fine!! thank u |
3.1.0-SNAPSHOT is still using Hibernate
@ForeignKey
which was deprecated after v4.3.0. I'm now getting lots of warnings and JPA validation errors (foreign keys missing in the table).should be changed to
and annotations like
to JPA 2.1 compliant
The text was updated successfully, but these errors were encountered: