diff --git a/lib/Doctrine/ORM/PersistentCollection.php b/lib/Doctrine/ORM/PersistentCollection.php index 3dc254a53..1ce3e495b 100644 --- a/lib/Doctrine/ORM/PersistentCollection.php +++ b/lib/Doctrine/ORM/PersistentCollection.php @@ -727,6 +727,6 @@ final class PersistentCollection extends AbstractLazyCollection implements Selec // Reattach NEW objects added through add(), if any. array_walk($newObjectsThatWereNotLoaded, [$this->collection, 'add']); - $this->isDirty = true; + $this->isDirty = (bool) $newObjectsThatWereNotLoaded; } }