Details
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.
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?