public function addTag(Tag $tag) { $tag->addBlogPost($this); // synchronously updating inverse side $this->tags[] = $tag; }