object of class symfony-component-form-formview could not be converted to string

121

object of class symfony\component\form\formview could not be converted to string -

//You need to implement the __toString() method in the Entreprise entity

namespace App\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity(repositoryClass="App\Repository\EntrepriseRepository")
 */
class Entreprise
{
    //...

    public function __toString()
    {
        return $this->entreprise_nom;
    }

    // ...
}

Comments

Submit
0 Comments