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"
But in fact, if I die()/stop my script in the listener, my database isn't updated. Is it a mistake on the documentation ?
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 ?
This is confusing, because the EntityManager->persist() operation has same name too but seems different to postPersist().
Doctrine/orm 2.9
Symfony 5.4
Documentation: https://www.doctrine-project.org/projects/doctrine-orm/en/2.9/reference/events.html
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"
But in fact, if I die()/stop my script in the listener, my database isn't updated. Is it a mistake on the documentation ?
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 ?
This is confusing, because the EntityManager->persist() operation has same name too but seems different to postPersist().
Doctrine/orm 2.9
Symfony 5.4
Documentation: https://www.doctrine-project.org/projects/doctrine-orm/en/2.9/reference/events.html