Skip to content

Loading…

DDC-1392: Merge for not initialized entity proxy object with set ID fails #2012

Closed
doctrinebot opened this Issue · 6 comments

2 participants

@doctrinebot

Jira issue originally created by user gedrox:

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.

@doctrinebot

Comment created by gedrox:

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.

@doctrinebot

Comment created by @beberlei:

Fixed

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by gedrox:

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?

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.1.2 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.