EDIT for those claiming "duplicate" question. Assume I don't know what entities I want to check. I want to check ALL CHANGES. Not "what was changed on entity x that I dont have a reference to.
Imagine I do this:
$e1 = $repo->find(1);
$e2 = $repo->find(2);
$e3 = $repo->find(3);
$e1->setMyName('xxx');
$e2->setMyName('yyy');
$e3->setMyName('zzz');
Then I forget about these changes, or forget to roll them back (not even sure how you would undo something like that).
Then at some distant place in the code, I call flush()
and I wonder "why is my_name set to "zzz" at some record, don't recall doing so."
Is there a way to easily see what flush is actually doing?