@@ -16,9 +16,17 @@ whenever an object in your database is saved.
16
16
17
17
Doctrine defines two types of objects that can listen to Doctrine events:
18
18
listeners and subscribers. Both are very similar, but listeners are a bit
19
- more straightforward. For more, see `The Event System `_ on Doctrine's website .
19
+ more straightforward. For more, see `The Event System `_ on Doctrine's documentation .
20
20
21
- The Doctrine website also explains all existing events that can be listened to.
21
+ Before using them, keep in mind that Doctrine events are intended for
22
+ persistence hooks (i.e. *"save also this when saving that" *). They should not be
23
+ used for domain logic, such as logging changes, setting ``updatedAt `` and
24
+ ``createdAt `` properties, etc.
25
+
26
+ .. seealso ::
27
+
28
+ This article covers listeners and subscribers for Doctrine ORM. If you are
29
+ using ODM for MongoDB, read the `DoctrineMongoDBBundle documentation `_.
22
30
23
31
Configuring the Listener/Subscriber
24
32
-----------------------------------
@@ -256,3 +264,4 @@ numbers mean that listeners are invoked earlier.
256
264
257
265
.. _`The Event System` : http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html
258
266
.. _`the DoctrineBundle documentation` : https://symfony.com/doc/current/bundles/DoctrineBundle/entity-listeners.html
267
+ .. _`DoctrineMongoDBBundle documentation` : https://symfony.com/doc/current/bundles/DoctrineMongoDBBundle/index.html
0 commit comments