Skip to content

Commit

Permalink
Fix Blog Tag relation
Browse files Browse the repository at this point in the history
  • Loading branch information
AchillesKal committed Apr 13, 2024
1 parent 4a99c9d commit 5ced343
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/Entity/BlogPost.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class BlogPost
#[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)]
private ?\DateTimeImmutable $publishedAt = null;

#[ORM\ManyToMany(targetEntity: Tag::class, inversedBy: 'tags')]
#[ORM\ManyToMany(targetEntity: Tag::class, inversedBy: 'blogPosts')]
private Collection $tags;

#[ORM\Column(length: 255, unique: true)]
Expand Down
1 change: 0 additions & 1 deletion src/Entity/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class Tag
#[LimitMenuTags]
private bool $isMenu = false;


public function __construct()
{
$this->blogPosts = new ArrayCollection();
Expand Down

0 comments on commit 5ced343

Please sign in to comment.