postPersist triggered after or before database operations ? #9831
-
Hi, I'm searching an Event triggered after database operations on New insert, cause the postUpdate is only on already existing data. So I've found this: "It will be invoked after the database insert operations" What is the real behavior of the postPersist() event ? trigger an event on new entity after database operation or trigger an event before flush operation ? Doctrine/orm 2.9 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The |
Beta Was this translation helpful? Give feedback.
The
postPersist
event is triggered after theINSERT
operations, but before the transaction is committed. If your application dies during the event, the database will roll back your changes.