mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1532: PostFlush lifecycle event #1921
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Dec 13, 2011).
Originally assigned to: @lcobucci on GitHub.
Jira issue originally created by user jack@actinum.nl:
In some cases, the database-id of the newly created record is needed in some postproccessing steps, like sending an e-mail containing a link to the just created entity. I've recently seen the added support for PostFlush, but this is not a lifecycle event.
class SomeEntityClass{
}
Perhaps it's even possible to have multiple PostFlush events, that differentiate between the first time a record is created, and when the record is merely updated.
@doctrinebot commented on GitHub (Dec 14, 2011):
Comment created by jack@actinum.nl:
Okay, please ignore this issue, as I now see that the @PostPersist does exactly what I need. I was thrown by the name, because to me, the order in which stuff happens is persist -> flush. The ID's are only known after flush, so i'd expected something like postflush to exist. Sorry.
@malukenho commented on GitHub (Jan 5, 2017):
@Ocramius @lcobucci can be closed as invalid.