I commence to write there are two days.
All test work fine until this morning.
When I try to launch it I got this error.
> Doctrine\Common\Annotations\AnnotationException: [Semantical Error]
> The annotation "@Doctrine\ORM\Mapping\Entity" in class
> Saaytu\Bundle\UserBundle\Entity\User does not exist, or could not be
> auto-loaded.
<?php
/*
* To change this license header, choose License Headers in Project
Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of User
*
* @author Khadim
*/
namespace Saaytu\Bundle\UserBundle\Entity;
//use FOS\UserBundle\Model\User as BaseUser;
use Sonata\UserBundle\Entity\BaseUser as BaseUser;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity
* @ORM\Table(name="utilisateurs")
* @UniqueEntity("telephone",message="Ce numéro est déjas utilisé.")
*/
class User extends BaseUser
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @var string
*
* @ORM\Column(name="telephone", type="string", length=255,
unique=true)
* @Assert\NotBlank()
*
*/
protected $telephone;
/**
* @var string
*
* @ORM\Column(name="nom", type="string", length=255)
* @Assert\NotBlank()
* @Assert\Length(
* min=2,
* max="255",
* minMessage="Le nom est trop court.",
* maxMessage="Le nom est trop long",
* groups={"Registration", "Profile"}
* )
*/
protected $nom;
/**
* @var string
*
* @ORM\Column(name="prenom", type="string", length=255)
* @Assert\NotBlank()
* @Assert\Length(
* min=2,
* max="255",
* minMessage="Le prénom est trop court.",
* maxMessage="Le prénom est trop long",
* groups={"Registration", "Profile"}
* )
*/
protected $prenom;
/**
*
@ORM\OneToMany(targetEntity="Saaytu\Bundle\AnnonceBundle\Entity\Annonce",
mappedBy="user")
*/
private $annonces;
/**
* Constructor
*/
public function __construct()
{
parent::__construct();
$this->annonces = new
\Doctrine\Common\Collections\ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId()
{
return $this->id;
}
/**
* Set telephone
*
* @param string $telephone
* @return User
*/
public function setTelephone($telephone)
{
$this->telephone = $telephone;
return $this;
}
/**
* Get telephone
*
* @return string
*/
public function getTelephone()
{
return $this->telephone;
}
/**
* Add annonces
*
* @param \Saaytu\Bundle\AnnonceBundle\Entity\Annonce $annonces
* @return User
*/
public function
addAnnonce(\Saaytu\Bundle\AnnonceBundle\Entity\Annonce $annonces)
{
$this->annonces[] = $annonces;
$annonces->setUser($this);
return $this;
}
/**
* Remove annonces
*
* @param \Saaytu\Bundle\AnnonceBundle\Entity\Annonce $annonces
*/
public function
removeAnnonce(\Saaytu\Bundle\AnnonceBundle\Entity\Annonce $annonces)
{
$this->annonces->removeElement($annonces);
}
/**
* Get annonces
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getAnnonces()
{
return $this->annonces;
}
/**
* Set nom
*
* @param string $nom
* @return User
*/
public function setNom($nom)
{
$this->nom = $nom;
return $this;
}
/**
* Get nom
*
* @return string
*/
public function getNom()
{
return $this->nom;
}
/**
* Set prenom
*
* @param string $prenom
* @return User
*/
public function setPrenom($prenom)
{
$this->prenom = $prenom;
return $this;
}
/**
* Get prenom
*
* @return string
*/
public function getPrenom()
{
return $this->prenom;
}
}
Need help please.
--
You received this message because you are subscribed to the Google Groups
"doctrine-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/doctrine-user.
For more options, visit https://groups.google.com/d/optout.