doctrine/doctrine2 — pull request #452 by timaschew (2012-09-21 19:57:53+00:00)
Title: fix persistance for many-to-one association when using not primary key for referenced column

Bugfix for exception:
Undefined index: xyz in ...\doctrine\orm\lib\Doctrine\ORM\Persisters\BasicEntityPersister.php line 608
Problem occur, if you are using not the primary key for a many-to-one association.
For example if you using: @JoinColumn(name="address_no", referencedColumnName="a_no")
$newValId has only the primary key as element, but
$newValId[$targetColumn] becomes in this case
$newValId['a_no'] and this element does not exist -> exception