Ver Mensaje Individual
  #3 (permalink)  
Antiguo 28/04/2013, 13:01
Avatar de SirDuque
SirDuque
 
Fecha de Ingreso: febrero-2009
Ubicación: Paso del Rey, Buenos Aires, Argentina
Mensajes: 975
Antigüedad: 15 años, 2 meses
Puntos: 89
Respuesta: [Desarrollo Web Agil Symfony2] Doctrine crea solo tabla Ciudad

Cita:
Iniciado por masterpuppet Ver Mensaje
No esta detectando el mapeo de las entidades(asumiendo que este existe).

Saludos.
Si masterpuppet entiendo que ese es el problema.

Realice las siguientes pruebas:

Código:
$ php app/console doctrine:generate:entities VehiculoBundle
Y me arroja el siguiente error:

Código:
Generating entities for bundle "VehiculoBundle"


                                                                 
  [RuntimeException]                                             
  Bundle "VehiculoBundle" does not contain any mapped entities.  
                                                                 


doctrine:generate:entities [--path="..."] [--no-backup] name
Verifico que este bien las carpetas:

Código:
ll src/Sistema/VehiculoBundle/Entity
total 16
drwxr-sr-x 2 mge www-data 4096 abr 27 13:32 ./
drwxr-sr-x 7 mge www-data 4096 abr 27 13:32 ../
-rw-r--r-- 1 mge www-data 4772 abr 28 15:48 Vehiculo.php

$ ll src/Sistema/VehiculoBundle/Entity/Vehiculo.php
-rw-r--r-- 1 mge www-data 4772 abr 28 15:48 src/Sistema/VehiculoBundle/Entity/Vehiculo.php
Luego googleando el error me encuentro con esto:

http://forum.symfony-project.org/viewtopic

El cual indica que tenia un error de sintaxis en la definición de las rutas en el archivo.

Cito mi archivo:

Código PHP:
Ver original
  1. <?php
  2.  
  3. namespace Sistema\VehiculoBundle\Entity;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6.  
  7. /**
  8.  * @ORM\Entity
  9.  * @ORM\Table(name="ch_vehiculo")
  10.  */
  11. class Vehiculo
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\Column(type="integer")
  16.      * @ORM\GeneratedValue
  17.      */
  18.     protected $id;
  19.     /** @ORM\Column(type="string", length=50, unique=true)*/
  20.     protected $dominio;
  21.     /** @ORM\Column(type="string", length=50, unique=true)*/
  22.     protected $chasis;
  23.     /** @ORM\Column(type="string", length=50, unique=true)*/
  24.     protected $motor;
  25.     /** @ORM\Column(type="integer")*/
  26.     protected $seguro;
  27.     /** @ORM\Column(type="integer")*/
  28.     protected $kmAcumulado;
  29.     /** @ORM\Column(type="string")*/
  30.     protected $observacion;
  31.     /** @ORM\Column(type="datetime")*/
  32.     protected $alta;
  33.     /** @ORM\Column(type="datetime")*/
  34.     protected $baja;
  35.     /** @ORM\Column(type="integer")*/
  36.     protected $estado;
  37.     /** @ORM\Column(type="boolean")*/
  38.     protected $activo;
  39.  
  40.     /**
  41.      * Get id
  42.      *
  43.      * @return integer
  44.      */
  45.     public function getId()
  46.     {
  47.         return $this->id;
  48.     }
  49.  
  50.     /**
  51.      * Set dominio
  52.      *
  53.      * @param string $dominio
  54.      * @return Vehiculo
  55.      */
  56.     public function setDominio($dominio)
  57.     {
  58.         $this->dominio = $dominio;
  59.    
  60.         return $this;
  61.     }
  62.  
  63.     /**
  64.      * Get dominio
  65.      *
  66.      * @return string
  67.      */
  68.     public function getDominio()
  69.     {
  70.         return $this->dominio;
  71.     }
  72.  
  73.     /**
  74.      * Set chasis
  75.      *
  76.      * @param string $chasis
  77.      * @return Vehiculo
  78.      */
  79.     public function setChasis($chasis)
  80.     {
  81.         $this->chasis = $chasis;
  82.    
  83.         return $this;
  84.     }
  85.  
  86.     /**
  87.      * Get chasis
  88.      *
  89.      * @return string
  90.      */
  91.     public function getChasis()
  92.     {
  93.         return $this->chasis;
  94.     }
  95.  
  96.     /**
  97.      * Set motor
  98.      *
  99.      * @param string $motor
  100.      * @return Vehiculo
  101.      */
  102.     public function setMotor($motor)
  103.     {
  104.         $this->motor = $motor;
  105.    
  106.         return $this;
  107.     }
  108.  
  109.     /**
  110.      * Get motor
  111.      *
  112.      * @return string
  113.      */
  114.     public function getMotor()
  115.     {
  116.         return $this->motor;
  117.     }
  118.  
  119.     /**
  120.      * Set seguro
  121.      *
  122.      * @param string $seguro
  123.      * @return Vehiculo
  124.      */
  125.     public function setSeguro($seguro)
  126.     {
  127.         $this->seguro = $seguro;
  128.    
  129.         return $this;
  130.     }
  131.  
  132.     /**
  133.      * Get seguro
  134.      *
  135.      * @return string
  136.      */
  137.     public function getSeguro()
  138.     {
  139.         return $this->seguro;
  140.     }
  141.  
  142.     /**
  143.      * Set kmAcumulado
  144.      *
  145.      * @param string $kmAcumulado
  146.      * @return Vehiculo
  147.      */
  148.     public function setKmAcumulado($kmAcumulado)
  149.     {
  150.         $this->kmAcumulado = $kmAcumulado;
  151.    
  152.         return $this;
  153.     }
  154.  
  155.     /**
  156.      * Get kmAcumulado
  157.      *
  158.      * @return string
  159.      */
  160.     public function getKmAcumulado()
  161.     {
  162.         return $this->kmAcumulado;
  163.     }
  164.  
  165.     /**
  166.      * Set observacion
  167.      *
  168.      * @param string $observacion
  169.      * @return Vehiculo
  170.      */
  171.     public function setObservacion($observacion)
  172.     {
  173.         $this->Observacion = $observacion;
  174.    
  175.         return $this;
  176.     }
  177.  
  178.     /**
  179.      * Get observacion
  180.      *
  181.      * @return string
  182.      */
  183.     public function getObservacion()
  184.     {
  185.         return $this->observacion;
  186.     }
  187.  
  188.     /**
  189.      * Set alta
  190.      *
  191.      * @param datetime $alta
  192.      * @return Vehiculo
  193.      */
  194.     public function setAlta($alta)
  195.     {
  196.         $this->alta = $alta;
  197.    
  198.         return $this;
  199.     }
  200.  
  201.     /**
  202.      * Get alta
  203.      *
  204.      * @return datetime
  205.      */
  206.     public function getAlta()
  207.     {
  208.         return $this->alta;
  209.     }
  210.  
  211.     /**
  212.      * Set baja
  213.      *
  214.      * @param datetime $baja
  215.      * @return Vehiculo
  216.      */
  217.     public function setBaja($baja)
  218.     {
  219.         $this->baja = $baja;
  220.    
  221.         return $this;
  222.     }
  223.  
  224.     /**
  225.      * Get baja
  226.      *
  227.      * @return datetime
  228.      */
  229.     public function getBaja()
  230.     {
  231.         return $this->baja;
  232.     }
  233.     /**
  234.      * Set estado
  235.      *
  236.      * @param integer $estado
  237.      * @return Vehiculo
  238.      */
  239.     public function setEstado($estado)
  240.     {
  241.         $this->estado = $estado;
  242.    
  243.         return $this;
  244.     }
  245.  
  246.     /**
  247.      * Get estado
  248.      *
  249.      * @return integer
  250.      */
  251.     public function getEstado()
  252.     {
  253.         return $this->estado;
  254.     }
  255.  
  256.     /**
  257.      * Set activo
  258.      *
  259.      * @param boolean $activo
  260.      * @return Vehiculo
  261.      */
  262.     public function setActivo($activo)
  263.     {
  264.         $this->activo = $activo;
  265.    
  266.         return $this;
  267.     }
  268.  
  269.     /**
  270.      * Get activo
  271.      *
  272.      * @return boolean
  273.      */
  274.     public function getActivo()
  275.     {
  276.         return $this->activo;
  277.     }
  278.  
  279.     /**
  280.      * echo Class
  281.      * @return sting Id Dominio
  282.      */
  283.     public function __toString()
  284.     {
  285.         return "(".$this->getId().") ".$this->getDominio();
  286.     }
  287. }
__________________
Mono programando!
twitter.com/eguimariano