Skip to content

Loading…

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

Closed
doctrinebot opened this Issue · 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
@doctrinebot doctrinebot added this to the 2.1.3 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.