Skip to content

Commit

Permalink
Flush new tags within loop
Browse files Browse the repository at this point in the history
  • Loading branch information
samwilson committed Feb 22, 2021
1 parent b9b29fe commit 036c421
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Repository/TagRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public function setTagsOnPost(Post $post, string $tags): void
$tag = new Tag();
$tag->setTitle($t);
$this->getEntityManager()->persist($tag);
$this->getEntityManager()->flush();
}
$post->addTag($tag);
}
Expand Down

0 comments on commit 036c421

Please sign in to comment.