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
If you only need to compare old and new state of object then probably this would be simpler:
$originalEntityData = $entityManager->getUnitOfWork()->getOriginalEntityData($entityObject);