DDC-3024: Proxy Notice if none of joined tables are primary #3792

Closed
doctrinebot opened this Issue Mar 11, 2014 · 4 comments

2 participants

@doctrinebot

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.

@doctrinebot

Comment created by @ocramius:

As discussed on the mailing list, this issue requires a failing test case to be confirmed.

@doctrinebot

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.

@doctrinebot

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.

@doctrinebot

Issue was closed with resolution "Invalid"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment