/**
* @ORM\Entity()
* @ORM\Table(name="Person", indexes={@ORM\Index(name="authentification_idx", columns={"email", "password"}),
- * @ORM\Index(name="search_idx", columns={"firstname", "lastname"})});
+ * @ORM\Index(name="search_idx", columns={"firstname", "lastname", "email"})});
*/
class Person
{
$this->friends_with_me->add($friendship);
}
- public function addFriend(User $friend)
+ public function addFriend(Person $friend)
{
$fs = new Friendship();
$fs->setPerson($this);