Details
Description
When merging entity with several associations to inherited classes update data gathering is broken after first inheritance processing because $entity variable is overwritten with another object.
The problem is in the line
Test case will be attached shortly,
It's https://github.com/doctrine/doctrine2/commit/80fae20f749f8db95156e333c430780a0717002f I guess.