[BUGFIX] Support composite keys on relations

This change adds handling of the @ORM\Id annotation on relation
properties which allows them to be used in composite keys.

Change-Id: Ibb562d51b181f9769b0c708a803f74e7cc527965
Releases: master, 2.1