mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Wrong behaviour of flush($entity) ? #5179
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @danionut90 on GitHub (Jul 7, 2016).
Originally assigned to: @Ocramius on GitHub.
both $entityA and $entityB have changes
$em->computeChangeSet($entityA);
$em->flush($entityB); -> the changes from $entityB and also $entityA will be saved to db.
Is this normal ?
@Ocramius commented on GitHub (Jul 7, 2016):
flush($entity)does not mean that$entitywill be the only change to be committed. It is a performance optimization that forces the entity manager to only compute changes on the given$entity, but previous computed changes will still apply.