Ver Mensaje Individual
  #7 (permalink)  
Antiguo 14/01/2013, 17:47
yanker
 
Fecha de Ingreso: septiembre-2008
Mensajes: 31
Antigüedad: 15 años, 8 meses
Puntos: 1
Respuesta: Imposible de montar doctrine2 + php

Hola masterpuppet. He intentado lo que me decias antes siguiendo el mismo esquema que antes puse al inicio del tema.

He intentado porner el namespace en la entidad y también me da el siguiente error:

Fatal error: Class 'Huesped' not found

posteo la clase que me ha generado el script inicial, por si sirve de ayuda.
Código PHP:
<?php

namespace entities
;

use 
DoctrineORMMapping as ORM;

/**
 * Huesped
 *
 * @ORM\Table(name="Huesped")
 * @ORM\Entity
 */
class Huesped
{
    
/**
     * @var integer
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    
private $id;

    
/**
     * @var string
     *
     * @ORM\Column(name="documento", type="string", length=10, nullable=false)
     */
    
private $documento;

    
/**
     * @var string
     *
     * @ORM\Column(name="nombres", type="string", length=50, nullable=false)
     */
    
private $nombres;

    
/**
     * @var string
     *
     * @ORM\Column(name="apellidos", type="string", length=50, nullable=false)
     */
    
private $apellidos;

    
/**
     * @var string
     *
     * @ORM\Column(name="telefono", type="string", length=10, nullable=false)
     */
    
private $telefono;


    
/**
     * Get id
     *
     * @return integer 
     */
    
public function getId()
    {
        return 
$this->id;
    }

    
/**
     * Set documento
     *
     * @param string $documento
     * @return Huesped
     */
    
public function setDocumento($documento)
    {
        
$this->documento $documento;
    
        return 
$this;
    }

    
/**
     * Get documento
     *
     * @return string 
     */
    
public function getDocumento()
    {
        return 
$this->documento;
    }

    
/**
     * Set nombres
     *
     * @param string $nombres
     * @return Huesped
     */
    
public function setNombres($nombres)
    {
        
$this->nombres $nombres;
    
        return 
$this;
    }

    
/**
     * Get nombres
     *
     * @return string 
     */
    
public function getNombres()
    {
        return 
$this->nombres;
    }

    
/**
     * Set apellidos
     *
     * @param string $apellidos
     * @return Huesped
     */
    
public function setApellidos($apellidos)
    {
        
$this->apellidos $apellidos;
    
        return 
$this;
    }

    
/**
     * Get apellidos
     *
     * @return string 
     */
    
public function getApellidos()
    {
        return 
$this->apellidos;
    }

    
/**
     * Set telefono
     *
     * @param string $telefono
     * @return Huesped
     */
    
public function setTelefono($telefono)
    {
        
$this->telefono $telefono;
    
        return 
$this;
    }

    
/**
     * Get telefono
     *
     * @return string 
     */
    
public function getTelefono()
    {
        return 
$this->telefono;
    }
}