When does the Doctrine prePersist event run?
19 June 2024 (Updated 19 June 2024)
On this page
In a nutshell
The prePersist
event is dispatched just before Doctrine performs the actual persist operation (i.e., just before the entity is about to be inserted into the database).
Other notes
Doctrine will not recognize changes made to relations in the prePersist
event. This includes modifications to collections such as additions, removals, or replacements.
Sources
Tagged:
Doctrine
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment