Symfony Doctrine entity friend hasFriend followers
I need to set follower, following (myFriends) hasFriend logic to my project. column "odobera" means "following" to example nick(id user) odobera (following to this user). User (25) is following user(37). Requests table: User entity: /** * @ORM\OneToMany(targetEntity="TB\RequestsBundle\Entity\Requests", mappedBy="odobera") */ protected $followers; /** * @ORM\OneToMany(targetEntity="TB\RequestsBundle\Entity\Requests", mappedBy="nick") */ protected $myFriends; public function __construct() { parent::__construct(); $this->followers = new \Doctrine\Common\Collections\ArrayCollection(); $this-