0
votes

Hello I'm working with sympfony 2,after that i create my database , i wished to create my crud , using command ( generate crud ) but i had this eroor : [Doctrine\ORM\Mapping\MappingException]
Class "MyApp\SmfBundle\Entity\Client" is not a valid entity or mapped super
class.
My class is

 namespace MyApp\SmfBundle\Entity;
 use Doctrine\ORM\Mapping as ORM;
 use Symfony\Component\Validator\Constraints as Assert;


/**
* @ORM\Entity
*/

class CLient {
 /**
* @ORM\GeneratedValue
* @ORM\Id
* @ORM\Column(type="integer")
*/
 private $id;
/**
 * @ORM\Column(type="string",length=255)
 * 
 */
private $nom;
/**
 * @ORM\Column(type="string",length=255)
 * 
 */
 private $prnom;

/**
 * @ORM\Column(type="date")
 * 
 */
private $DateNaissance;
public function getId() {
 return $this->id;
 }

public function getNom() {
return $this->nom;
}

public function getPrnom() {
return $this->prnom;
}

public function getDateNaissance() {
return $this->DateNaissance;
}

public function setId($id) {
$this->id = $id;
}

public function setNom($nom) {
  $this->nom = $nom;
}

public function setPrnom($prnom) {
$this->prnom = $prnom;
}

public function setDateNaissance($DateNaissance) {
$this->DateNaissance = $DateNaissance;
}


}

WHat i should do, Thank you for your help

1

1 Answers

2
votes

class CLient {

PHP is case sensitive. Your class is currently called CLient. Not Client.