[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: |
|
| 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. |
| 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? |