JPA @ForeignKey still not consistently applied from annotation binding

Description

Since is closed I create this new issue. The problematic cases which are still not applied correctly are:

  • AssociationOverride.foreignKey()

  • JoinColumns.foreignKey()

  • MapKeyJoinColumn.foreignKey()

  • MapKeyJoinColumns.foreignKey()

  • PrimaryKeyJoinColumns.foreignKey()

  • PrimaryKeyJoinColumn.foreignKey()

Environment

None

Activity

Show:
Gail Badner
April 6, 2017, 8:19 PM

, this issue is closed. If there is still a problem, then please open a new issue along with a test case that reproduces it.

Markus Kettunen
March 17, 2017, 6:50 PM

It seems that this PR hasn't fixed @JoinColumn -annotation with ConstraintMode.NO_CONSTRAINT. I still have "Cannot add or update a child row: a foreign key constraint fails (`dbname`.`#sql-c5c_2f0e`, CONSTRAINT `FK2pkh6qroghn6tupgw1wpykm2o` FOREIGN KEY (`product_id`) REFERENCES `kone_product` (`id`))" when trying to start the application.

Log.java

Product.java

Same problem with modified code:

Log.java

Product.java

And even if I take logs completely away from Product.java I got the same error message.

Vlad Mihalcea
February 15, 2017, 12:46 PM

Applied PR upstream.

Vlad Mihalcea
February 15, 2017, 12:36 PM

Applied PR upstream.

Christian Beikov
October 21, 2016, 5:57 PM

The PR contains the test showing the problems: https://github.com/hibernate/hibernate-orm/pull/1601

Fixed

Assignee

Chris Cranford

Reporter

Christian Beikov

Fix versions