I am working on a patch to fix HHH-1570. The patch is highly inspired from the old patch attached to the JIRA issue with a few modifications. After applying my patch the test case (see patch HHH-1570-it.patch attached to the issue) runs fine but there is a regression on another test: FumTest.testKeyManyToOne()