Users can see campaigns
only if they're assigned to them. The fact that they can see campaign doesn't mean that they're participating to it. I want to give the opportunity for user to join to campaign.
I use Bidirectional, ManyToMany relation, table user_campaign
was created automatically. Is any possibility to add additional field like participating
? I'd rather not to create new table.
Entity User.php
/**
* @ORM\ManyToMany(targetEntity="Reko\CampaignBundle\Entity\Campaign", inversedBy="users")
* @ORM\OrderBy({"id" = "DESC"})
* @ORM\JoinTable(name="user_campaign")
*/
protected $campaigns;
Entity Campaign.php
/**
* @ORM\ManyToMany(targetEntity="Reko\UserBundle\Entity\User", mappedBy="campaigns")
*/
protected $users;