This content has been marked as final.
Show 2 replies
-
1. Re: Foreign key constraint issue in WildFly
simkam May 27, 2019 6:07 AM (in response to valsaraj007)1 of 1 people found this helpfulHi,
I'm not sure it will help but you could try setting "hibernate.implicit_naming_strategy" to "legacy-hbm".
-
2. Re: Foreign key constraint issue in WildFly
valsaraj007 Jan 31, 2020 7:51 AM (in response to simkam)1 of 1 people found this helpfulThanks for pointing this.
I have applied the following JPA 2.1 annotation to set FK name, so that it will be using same name in both versions of WildFly.
@ManyToOne
@JoinColumn(name = "company_id", nullable = false, foreignKey = @ForeignKey(name="FK_COMPANY__ROUTE"))
private Company company;https://stackoverflow.com/questions/6608812/jpa-give-a-name-to-a-foreign-key-on-db/21426770