Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.1.1
-
Fix Version/s: 2.1.3
-
Component/s: None
-
Security Level: All
-
Labels:None
-
Environment:Symfony 2.0.3 / LAMP
Description
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)
verified.