[DDC-1392] Merge for not initialized entity proxy object with set ID fails Created: 23/Sep/11  Updated: 26/Sep/11  Resolved: 25/Sep/11

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.1.1
Fix Version/s: 2.1.2
Security Level: All

Type: Bug Priority: Major
Reporter: Aigars Gedroics Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None

Attachments: File DDC1392Test.php    

 Description   

Problem is that UnitOfWork::doMerge() calls ClassMetadata::getIdentifierValues() for the entity but that function doesn't have case for not initialized proxy. It just reads the Id properties from the object's reflection.

It should load the proxy or get the ID stored inside the proxy object or doMerge must initialize it maybe.



 Comments   
Comment by Aigars Gedroics [ 23/Sep/11 ]

I have taken the DDC353 test as the base for this test case.
Hopefully it works because I have executed it in slightly different version without the Doctrine tests environment.

Comment by Benjamin Eberlei [ 25/Sep/11 ]

Fixed

Comment by Aigars Gedroics [ 26/Sep/11 ]

I would put the changes inside the method getIdentifierValues not before it's execution.

Isn't it plausible that it is called with not initialized proxy from somewhere else?

Generated at Sat Dec 20 23:51:02 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.