Take the 2-minute tour ×

How can I schedule an entity for update, manually, when no property is actually changed?

I tried $entityManager->getUnitOfWork()->scheduleForUpdate($entity) but it gave an error in the core, and I have no intetion of debuging Doctrine.

The entity is managed if it matters: $entity = $repository->findOne(1)

I need this so doctrine would call my EventSubscriber on flush().

I've also tried something like $entityManager->getEventManager()->dispatchEvent(\Doctrine\ORM\Events::preUpdate), but then my listener's preUpdate() receives EventArgs instead of PreUpdateEventArgs.

Any help is appreciated!

share|improve this question
add comment

1 Answer

What's the goal? If there is no property changed, why would you plan an update?

share|improve this answer
add comment

Your Answer


