Skip to content

Commit d3ee532

Browse files
committed
Merge branch '4.4'
* 4.4: Add tag name for MongoDB event listener
2 parents e3b9239 + 2d974b6 commit d3ee532

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

doctrine/event_listeners_subscribers.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@ whenever an object in your database is saved.
1616

1717
Doctrine defines two types of objects that can listen to Doctrine events:
1818
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.
2020

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`_.
2230

2331
Configuring the Listener/Subscriber
2432
-----------------------------------
@@ -256,3 +264,4 @@ numbers mean that listeners are invoked earlier.
256264
257265
.. _`The Event System`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/reference/events.html
258266
.. _`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

Comments
 (0)