Created
February 20, 2011 12:01
-
-
Save hhamon/835929 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| namespace Sensio\Bundle\JobeetBundle\Entity; | |
| use Doctrine\Common\Collections\ArrayCollection; | |
| /** | |
| * The Affiliate entity class. | |
| * | |
| * @orm:Entity | |
| * @orm:Table(name="jobeet_affiliate") | |
| */ | |
| class Affiliate | |
| { | |
| /** | |
| * The associated categories. | |
| * | |
| * @var Doctrine\Common\Collections\ArrayCollection; | |
| * | |
| * @orm:ManyToMany(targetEntity="Category", inversedBy="affiliates") | |
| * @orm:JoinTable( | |
| * joinColumns={@orm:JoinColumn(name="affiliate_id", referencedColumnName="id")}, | |
| * inverseJoinColumns={@orm:JoinColumn(name="category_id", referencedColumnName="id")} | |
| * ) | |
| */ | |
| private $categories; | |
| // ... | |
| } | |
| class Category | |
| { | |
| /** | |
| * The associated affiliates. | |
| * | |
| * @var Doctrine\Common\Collections\ArrayCollection; | |
| * | |
| * @orm:ManyToMany(targetEntity="Affiliate", inversedBy="categories") | |
| */ | |
| private $affiliates; | |
| // ... | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment