From 57f560401bcb7f9e27d02958662a7ab78657d4a0 Mon Sep 17 00:00:00 2001 From: John Date: Mon, 23 Jan 2017 09:35:26 +0100 Subject: [PATCH] Note on Entity listeners As requested here https://github.com/doctrine/doctrine2/issues/6247#issuecomment-274123780 I thought it should be interesting to note that. The note could be longer, like "You should avoid to have multiple methods for the same event (e.g. multiple @PrePersist) since the execution order is not guaranteed". --- docs/en/reference/events.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/en/reference/events.rst b/docs/en/reference/events.rst index e6c8b0aa413..7922d3dfd1d 100644 --- a/docs/en/reference/events.rst +++ b/docs/en/reference/events.rst @@ -888,6 +888,9 @@ you need to map the listener method using the event type mapping: preRemove: [preRemoveHandler] # .... +.. note:: + + The order of execution of multiple methods for the same event (e.g. multiple @PrePersist) is not guaranteed. Entity listeners resolver