public function replaceReconstitutedEntity($oldEntity, $newEntity) { $this->reconstitutedEntities->detach($oldEntity); $this->reconstitutedEntities->attach($newEntity); }