Fixed Document <-> Group relationship mapping

This commit is contained in:
Polonkai Gergely 2012-07-17 10:11:53 +02:00
parent b173b9a9bb
commit c44a8bc144
2 changed files with 7 additions and 7 deletions

View File

@ -182,12 +182,7 @@ class Document
/** /**
* @var Doctrine\Common\Collections\ArrayCollection $groups * @var Doctrine\Common\Collections\ArrayCollection $groups
* @ORM\ManyToMany(targetEntity="KekRozsak\FrontBundle\Entity\Group") * @ORM\ManyToMany(targetEntity="KekRozsak\FrontBundle\Entity\Group", mappedBy="documents")
* @ORM\JoinTable(name="group_document", joinColumns={
* @ORM\JoinColumn(name="document_id", referencedColumnName="id"),
* }, inverseJoinColumns={
* @ORM\JoinColumn(name="group_id", referencedColumnName="id")
* })
*/ */
protected $groups; protected $groups;

View File

@ -305,7 +305,12 @@ class Group
/** /**
* @var Doctrine\Common\Collections\ArrayCollection $documents * @var Doctrine\Common\Collections\ArrayCollection $documents
* @ORM\ManyToMany(targetEntity="Document") * @ORM\ManyToMany(targetEntity="Document", inversedBy="groups")
* @ORM\JoinTable(name="group_document", inverseJoinColumns={
* @ORM\JoinColumn(name="document_id", referencedColumnName="id"),
* }, joinColumns={
* @ORM\JoinColumn(name="group_id", referencedColumnName="id")
* })
*/ */
protected $documents; protected $documents;