Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/09/2012, 17:55
merysmarcano
 
Fecha de Ingreso: septiembre-2012
Mensajes: 19
Antigüedad: 11 años, 7 meses
Puntos: 0
Pregunta Error al actualizar base de datos despues de crear entidad

Buenas.

Estoy tratando de actualizar la base de datos de mi aplicación depues de crear la entidad rol y me da el siguiente error:

Código Apache:
Ver original
  1. [Doctrine\Common\Annotations\AnnotationException]                                                                                  
  2.   [Type Error] Attribute "length" of @ORM\Column declared on property UNID\OtcBundle\Entity\Role::$name expects a(n) integer, but g  
  3.   ot string.

La entidad Rol contiene lo siguiente:

Código PHP:
Ver original
  1. namespace UNID\OtcBundle\Entity;
  2.  
  3.  
  4. use Symfony\Component\Security\Core\Role\RoleInterface;
  5. use Doctrine\ORM\Mapping as ORM;
  6.  
  7. /**
  8.  * @ORM\Entity
  9.  * @ORM\Table(name="admin_roles")
  10.  */
  11. class Role implements RoleInterface
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\Column(type="integer")
  16.      * @ORM\GeneratedValue(strategy="AUTO")
  17.      */
  18.     protected $id;
  19.  
  20.     /**
  21.      * @ORM\Column(name="nombre", type="string", length="255")
  22.      */
  23.     protected $name;
  24.  
  25.     /**
  26.      * Get id
  27.      *
  28.      * @return integer
  29.      */
  30.     public function getId()
  31.     {
  32.         return $this->id;
  33.     }
  34.  
  35.     /**
  36.      * Set name
  37.      *
  38.      * @param string $name
  39.      */
  40.     public function setName($name)
  41.     {
  42.         $this->name = $name;
  43.     }
  44.  
  45.     /**
  46.      * Get name
  47.      *
  48.      * @return string
  49.      */
  50.     public function getName()
  51.     {
  52.         return $this->name;
  53.     }
  54.  
  55.     public function getRole() {
  56.         return $this->getName();
  57.     }
  58.  
  59.     public function __toString() {
  60.         return $this->getRole();
  61.     }
  62. }

Agradezco si alguien puede orientarme.