test case to prevent duplicated associations with custom PK.

closes #9201
Merge pull request #9397 from senny/9201_duplicate_associations_with_natural_key

test case to prevent duplicated associations with custom PK.