If a table inherits foreign keys which reference a non primary key column then the generated foreign incorrectly references the primary key column.
This is because the referenced columns from the included table are not passed to the call to create the foreign key in the DenormailzedTable class.
I pushed patch (I apologise for not calling the branch by the JIRA name)
, thanks much for the pull request. Do you have a test case we could use?
, never mind – the test case was simple and I just added it. Thanks again for the fix!