I need to check if a persisted entity has changed and needs to be updated on the database. What I made (and did not work) was the following:
$product = $enti
I didn't need/want to create Listeners for my case so I ended up with
$product->setName('A different name'); $uow = $entityManager->getUnitOfWork(); $uow->computeChangeSets(); if ($uow->isEntityScheduled($product)) { // My entity has changed }