mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1399: Wrong count() value in many-to-many relationship and EXTRA_LAZY #1754
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 @doctrinebot on GitHub (Sep 30, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user elnino:
Relation many-to-many, EXTRA_LAZY, $user is owning side. Without EXTRA_LAZY all is ok.
Main problem: counter is increased twice.
$user->getPhotos()->count(); // returns 100 (OK)
$user->addPhoto($photo);
$user->getPhotos()->count(); // returns 101 (OK)
$em->flush();
$user->getPhotos()->count(); // returns 102 (WRONG! Should be 101)
@doctrinebot commented on GitHub (Oct 31, 2011):
Comment created by @beberlei:
verified.
@doctrinebot commented on GitHub (Oct 31, 2011):
Comment created by @beberlei:
fixed
@doctrinebot commented on GitHub (Oct 31, 2011):
Issue was closed with resolution "Fixed"