Skip to content

Commit

Permalink
add many-to-many relationship
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul M. Jones committed Oct 23, 2018
1 parent 0fae22f commit a6b13be
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/DataSource/Thread/ThreadRelationships.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Atlas\Testing\DataSource\Author\Author;
use Atlas\Testing\DataSource\Summary\Summary;
use Atlas\Testing\DataSource\Reply\Reply;
use Atlas\Testing\DataSource\Tag\Tag;
use Atlas\Testing\DataSource\Tagging\Tagging;

class ThreadRelationships extends MapperRelationships
Expand All @@ -21,5 +22,7 @@ protected function define()

$this->oneToMany('taggings', Tagging::CLASS)
->onDeleteSetNull();

$this->manyToMany('tags', Tag::CLASS, 'taggings');
}
}

0 comments on commit a6b13be

Please sign in to comment.