Affects Version/s: None
Fix Version/s: 2.2
Security Level: All
Pull-Request was automatically synchronized: https://github.com/doctrine/doctrine2/pull/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.
|Field||Original Value||New Value|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Fix Version/s||2.2-DEV [ 10157 ]|
|Resolution||Fixed [ 1 ]|
|Workflow||jira [ 13158 ]||jira-feedback [ 15105 ]|
|Workflow||jira-feedback [ 15105 ]||jira-feedback2 [ 16969 ]|
|Workflow||jira-feedback2 [ 16969 ]||jira-feedback3 [ 19222 ]|