Skip to content

Loading…

DDC-1479: GH-169: preFlush event and lifecycle callback #2109

Closed
doctrinebot opened this Issue · 4 comments

2 participants

@doctrinebot

Jira issue originally created by user @beberlei:

Pull-Request was automatically synchronized: #169

For now, we have @PrePersist, @PreUpdate and @PreRemove callbacks. But it's not enough, cuz in some cases we need to run some entity method just before every EntityManager#flush() call (examples - translatable behavior and file uploading routines).

I've added and tested new @PreFlush event, which occurs during the start of the EntityManager#flush(), before any changeset gets calculated. This gives users ability to hook into flush process and prepare their entities to save even if they were not changed.

@doctrinebot

Comment created by @beberlei:

Merged into master

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by @beberlei:

A related Github Pull-Request [GH-169] was opened
doctrine/dbal#169

@doctrinebot

Comment created by @beberlei:

A related Github Pull-Request [GH-169] was closed
doctrine/dbal#169

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.2 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.