Is there a built-in way to get all of the changed/updated fields in a Doctrine 2 entity

You can use Doctrine\ORM\EntityManager#getUnitOfWork to get a Doctrine\ORM\UnitOfWork. Then just trigger changeset computation (works only on managed entities) via Doctrine\ORM\UnitOfWork#computeChangeSets(). You can use also similar methods like Doctrine\ORM\UnitOfWork#recomputeSingleEntityChangeSet(Doctrine\ORM\ClassMetadata $meta, $entity) if you know exactly what you want to check without iterating over the entire object graph. After that you can use Doctrine\ORM\UnitOfWork#getEntityChangeSet($entity) to retrieve all … Read more

Doctrine2: Best way to handle many-to-many with extra columns in reference table

I’ve opened a similar question in the Doctrine user mailing list and got a really simple answer; consider the many to many relation as an entity itself, and then you realize you have 3 objects, linked between them with a one-to-many and many-to-one relation. http://groups.google.com/group/doctrine-user/browse_thread/thread/d1d87c96052e76f7/436b896e83c10868#436b896e83c10868 Once a relation has data, it’s no more a relation … Read more