Detecting something unique about current doctrine action #11604
Unanswered
pkly
asked this question in
Support Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I was wondering about a following situation and just wanted to get a confirmation on it.
I know that work is done in a unit of work, but are those objects wholly unique?
I was wondering if the following logic is okay:
which then would in turn call a doctrine listener, which would do an action for the entity
onPrePersist
, like soAssuming I also I have another listener which is listening to let's say all doctrine events, if I look at the spl_object_ids of UnitOfWorks associated with events fired by doctrine at this point will I get one or two objects? I wrote an event linking library a while back for symfony but I wanted to appropriately link events which should fire after
postFlush
to the appropriate UnitOfWork.Edit: It appears UOW is always the same, as it's created by the EM when that's initialized, so unless the manager itself would be reset it'd stay the same. Is there a good way to keep track of what is being changed through the events then?
Beta Was this translation helpful? Give feedback.
All reactions