• PHP
  • Doctrine2 entity changeset for relations

    Doctrine2 offers very powerful API for getting entity properties that have changed. This can be achieved using Doctrine\ORM\UnitOfWork. We can call: Doctrine\ORM\UnitOfWork::computeChangeSets() to compute all the changes that have been done to entities and collections and store these changes; Doctrine\ORM\UnitOfWork::getEntityChangeSet($entity) to retrieve all changes to our entity object; Doctrine\ORM\UnitOfWork::getOriginalEntityData($entity) to retrieve the original data of […]