Jira issue originally created by user nimasdj:
In case of ManyToOne/OneToMany if NONE of joined coloumns are primary it throws a proxy notice:
NOTICE: Undefined index: id in /vendor/doctrine/common/lib/Doctrine/Common/Proxy/AbstractProxyFactory.php on line 121
Can be replicated this by running:
$somethings = $em->getRepository('Entities\Something')->findBy(array('productId' => "4"));
Something entity is ManyToOne to another OneToMany entity, and this productId is primary on NONE of these two entities/tables.
Comment created by @ocramius:
As discussed on the mailing list, this issue requires a failing test case to be confirmed.
Comment created by nimasdj:
I am trying to do so Marco, but I am stuck for $metadata thing I said in that thread, as soon as you advice how to fix that, I will be able to run a failing test.
Comment created by @beberlei:
not using the primary for the joined columns is not supported and the SchemaValidator already gives an error about that. Runtime checks are not possible here.
Issue was closed with resolution "Invalid"