DDC-1399: Wrong count() value in many-to-many relationship and EXTRA_LAZY #2020

Closed
doctrinebot opened this Issue Sep 30, 2011 · 3 comments

2 participants

@doctrinebot

Jira issue originally created by user elnino:

Relation many-to-many, EXTRALAZY, $user is owning side. Without EXTRALAZY 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

Comment created by @beberlei:

verified.

@doctrinebot

Comment created by @beberlei:

fixed

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added this to the 2.1.3 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment