From 63a543d6a0f5821038ab5f35de465ee3fbf35230 Mon Sep 17 00:00:00 2001 From: Robin Hallabro Date: Wed, 17 Jun 2015 07:57:11 +0200 Subject: [PATCH] Update events.rst to reflect behaviour of preUpdate --- docs/en/reference/events.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/en/reference/events.rst b/docs/en/reference/events.rst index 6ec2f092d..4a52af8c8 100644 --- a/docs/en/reference/events.rst +++ b/docs/en/reference/events.rst @@ -164,7 +164,8 @@ the life-time of their registered entities. database insert operations. Generated primary key values are available in the postPersist event. - preUpdate - The preUpdate event occurs before the database - update operations to entity data. It is not called for a DQL UPDATE statement. + update operations to entity data. It is not called for a DQL UPDATE statement + nor when the computed changeset is empty. - postUpdate - The postUpdate event occurs after the database update operations to entity data. It is not called for a DQL UPDATE statement. - postLoad - The postLoad event occurs for an entity after the @@ -652,7 +653,8 @@ preUpdate PreUpdate is the most restrictive to use event, since it is called right before an update statement is called for an entity inside the -``EntityManager#flush()`` method. +``EntityManager#flush()`` method. Note that this event is not +triggered when the computed changeset is empty. Changes to associations of the updated entity are never allowed in this event, since Doctrine cannot guarantee to correctly handle