[DDC-1392] Merge for not initialized entity proxy object with set ID fails Created: 23/Sep/11  Updated: 16/Jan/15  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    
Issue Links:
is referenced by DDC-3368 [GH-1172] Don't initialize detached p... Resolved


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.

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 ]


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 Oct 10 06:52:45 EDT 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.