Entity is not being updated in a long-running process #9030
-
I'm struggling with Doctrine to update my entities. I ran the following snippet and I could see that only the first message received by my long-running process has resulted in changes (although all the received messages led to changes in my entity): $wow = $this->_em->getUnitOfWork();
$wow->computeChangeSets();
$changes = $wow->getEntityChangeSet($someEntity); I've also deleted the snippet and only observed the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Solved: The entity has another repository to handle only-read versions of it. What happened was an event that called that read-only repository and then set the class metadata to read-only. As that metadata is shared, Doctrine stopped tracking changes on all my entities (of that class). |
Beta Was this translation helpful? Give feedback.
Solved: The entity has another repository to handle only-read versions of it. What happened was an event that called that read-only repository and then set the class metadata to read-only. As that metadata is shared, Doctrine stopped tracking changes on all my entities (of that class).