Ver Mensaje Individual
  #12 (permalink)  
Antiguo 18/12/2012, 09:25
necbalaam
 
Fecha de Ingreso: abril-2012
Mensajes: 25
Antigüedad: 12 años, 7 meses
Puntos: 0
Respuesta: Problemas con consulta symfony

Cita:
Iniciado por masterpuppet Ver Mensaje
Revisa la metadata, es correcto el mappedBy de la propiedad descriptions ?, no debería ser hotels en vez de descriptions ?, postea la entidad HotelDescriptions
Código:
<?
namespace cnt\HBBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use cnt\HBBundle\Entity\Lenguages;
use Symfony\Component\Validator\Constrainst as Assert;

/** 
* @ORM\Entity(repositoryClass="cnt\HBBundle\Entity\HotelDescriptionsRepository")
* @ORM\Table(name="HOTEL_DESCRIPTIONS")
*/

class HotelDescriptions
{ 
	/**
	* @ORM\Id
        * @ORM\Column(name="HotelCode",type="string", length=8, nullable=false, unique=true)
        * @ORM\ManyToOne(targetEntity="Hotels", inversedBy="descriptions")
          */
	protected $hotelcode;
	
	/**
	* @ORM\Id
	* @ORM\ManyToOne(targetEntity="LANGUAGES", inversedBy="HOTEL_DESCRIPTIONS")
	* @ORM\Column(name="LanguageCode",type="string", length=3, nullable=false)
    */
	protected $languagecode;
	
	/**
	* @ORM\Column(name="HotelFacilities",type="string", length=2000, nullable=false)
    */
	protected $hotelfacilities;
	
	/**
	* @ORM\Column(name="HotelLocationDescription",type="string", length=2000, nullable=false)
    */
	protected $hotellocationdescription;
	
	/**
	* @ORM\Column(name="HotelRoomDescription",type="string", length=2000, nullable=false)
    */
	protected $hotelroomdescription;
	
	/**
	* @ORM\Column(name="HolelSportDescription",type="string", length=2000, nullable=false)
    */
	protected $holelsportdescription;
	
	/**
	* @ORM\Column(name="HotelMealsDescription",type="string", length=2000, nullable=false)
    */
	protected $hotelmealsdescription;
	
	/**
	* @ORM\Column(name="HotelPaymentMethods",type="string", length=2000, nullable=false)
    */
	protected $HotelPaymentMethods;
	
	/**
	* @ORM\Column(name="HotelHowToGetThere",type="string", length=2000, nullable=false)
    */
	protected $hotelhowtogetthere;
	
	/**
	* @ORM\Column(name="HotelComments",type="string", length=2000, nullable=false)
    */
	protected $hotelcomments;
   

    /**
     * Set hotelcode
     *
     * @param string $hotelcode
     * @return HotelDescriptions
     */
    public function setHotelcode($hotelcode)
    {
        $this->hotelcode = $hotelcode;
    
        return $this;
    }

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

    /**
     * Set languagecode
     *
     * @param string $languagecode
     * @return HotelDescriptions
     */
    public function setLanguagecode($languagecode)
    {
        $this->languagecode = $languagecode;
    
        return $this;
    }

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

    /**
     * Set hotelfacilities
     *
     * @param string $hotelfacilities
     * @return HotelDescriptions
     */
    public function setHotelfacilities($hotelfacilities)
    {
        $this->hotelfacilities = $hotelfacilities;
    
        return $this;
    }

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

    /**
     * Set hotellocationdescription
     *
     * @param string $hotellocationdescription
     * @return HotelDescriptions
     */
    public function setHotellocationdescription($hotellocationdescription)
    {
        $this->hotellocationdescription = $hotellocationdescription;
    
        return $this;
    }

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

    /**
     * Set hotelroomdescription
     *
     * @param string $hotelroomdescription
     * @return HotelDescriptions
     */
    public function setHotelroomdescription($hotelroomdescription)
    {
        $this->hotelroomdescription = $hotelroomdescription;
    
        return $this;
    }

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

    /**
     * Set holelsportdescription
     *
     * @param string $holelsportdescription
     * @return HotelDescriptions
     */
    public function setHolelsportdescription($holelsportdescription)
    {
        $this->holelsportdescription = $holelsportdescription;
    
        return $this;
    }

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

    /**
     * Set hotelmealsdescription
     *
     * @param string $hotelmealsdescription
     * @return HotelDescriptions
     */
    public function setHotelmealsdescription($hotelmealsdescription)
    {
        $this->hotelmealsdescription = $hotelmealsdescription;
    
        return $this;
    }

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

    /**
     * Set HotelPaymentMethods
     *
     * @param string $hotelPaymentMethods
     * @return HotelDescriptions
     */
    public function setHotelPaymentMethods($hotelPaymentMethods)
    {
        $this->HotelPaymentMethods = $hotelPaymentMethods;
    
        return $this;
    }

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

    /**
     * Set hotelhowtogetthere
     *
     * @param string $hotelhowtogetthere
     * @return HotelDescriptions
     */
    public function setHotelhowtogetthere($hotelhowtogetthere)
    {
        $this->hotelhowtogetthere = $hotelhowtogetthere;
    
        return $this;
    }

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

    /**
     * Set hotelcomments
     *
     * @param string $hotelcomments
     * @return HotelDescriptions
     */
    public function setHotelcomments($hotelcomments)
    {
        $this->hotelcomments = $hotelcomments;
    
        return $this;
    }

    /**
     * Get hotelcomments
     *
     * @return string 
     */
    public function getHotelcomments()
    {
        return $this->hotelcomments;
    }
}
asi lo tengo :S