Optimized database schema

This commit is contained in:
Kevin Frantz
2018-10-31 21:53:30 +01:00
parent 0a18123384
commit ad00c57143
6 changed files with 13 additions and 19 deletions

View File

@@ -42,7 +42,7 @@ abstract class AbstractSource extends AbstractEntity implements SourceInterface
* @todo Rename table to use the right schema
*
* @var Collection|GroupSource[]
* @ORM\ManyToMany(targetEntity="GroupSource")
* @ORM\ManyToMany(targetEntity="GroupSource",mappedBy="members")
*/
protected $groups;

View File

@@ -19,7 +19,8 @@ final class GroupSource extends AbstractSource implements MembersAttributInterfa
/**
* @var Collection
* @ORM\ManyToMany(targetEntity="AbstractSource")
* @ORM\ManyToMany(targetEntity="AbstractSource",inversedBy="groups")
* @ORM\JoinTable(name="source_group_members")
*/
protected $members;