18/12/2012, 15:20
|
| | Fecha de Ingreso: abril-2012
Mensajes: 25
Antigüedad: 12 años, 7 meses Puntos: 0 | |
Respuesta: Problemas con consulta symfony Hola que tal mira nuevamente hice los cambios, lo genere con el comando mis entidades nuevamente, utilizando las relaciones "aunque no se ecuentren en la base de datos original que me dieron..." le cree todas las relaciones que se suponen deberian de estar "como me lo representaron en un documento que me dieron"... y tengo asi mis entidades:
Hotels:
Código:
<?
namespace cnt\HBBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use cnt\HBBundle\Entity\CategoryDescriptions;
use cnt\HBBundle\Entity\Zones;
use Symfony\Component\Validator\Constrainst as Assert;
/**
* @ORM\Entity(repositoryClass="cnt\HBBundle\Entity\HotelsRepository")
* @ORM\Table(name="HOTELS")
*/
class Hotels
{
/**
* @ORM\Id
* @ORM\OneToMany(targetEntity="HOTEL_DESCRIPTIONS", mappedBy="HOTELS")
* @ORM\OneToMany(targetEntity="CONTACTS", mappedBy="HOTELS")
* @ORM\OneToMany(targetEntity="PHONES", mappedBy="HOTELS")
* @ORM\OneToMany(targetEntity="HOTEL_IMAGES", mappedBy="HOTELS")
* @ORM\Column(name="HOTELCODE",type="string", length=8, unique=true)
*/
protected $hotelcode;
/**
* @ORM\Column(name="NAME",type="string", length=50)
*/
protected $name;
/**
* @ORM\ManyToOne(targetEntity="CATEGORIES", inversedBy="HOTELS")
* @ORM\Column(name="CATEGORYCODE",type="string", length=5)
*/
protected $categorycode;
/**
* @ORM\Column(name="DESTINATIONCODE",type="string", length=3)
*/
protected $destinationcode;
/**
* @ORM\ManyToOne(targetEntity="ZONES", inversedBy="HOTELS")
* @ORM\Column(name="ZONECODE",type="string", length=8, nullable=true)
*/
protected $zonecode = null;
/**
* @ORM\ManyToOne(targetEntity="CHAINS", inversedBy="HOTELS")
* @ORM\Column(name="CHAINCODE",type="string", length=5, nullable=true)
*/
protected $chaincode = null;
/**
* @ORM\Column(name="LICENCE",type="string", length=15, nullable=true)
*/
protected $licence = null;
/**
* @ORM\Column(name="LATITUDE",type="string", length=45, nullable=true)
*/
protected $latitude = null;
/**
* @ORM\Column(name="LONGITUDE",type="string", length=45, nullable=true)
*/
protected $longitude = null;
/**
* Set hotelcode
*
* @param string $hotelcode
* @return Hotels
*/
public function setHotelcode($hotelcode)
{
$this->hotelcode = $hotelcode;
return $this;
}
/**
* Get hotelcode
*
* @return string
*/
public function getHotelcode()
{
return $this->hotelcode;
}
/**
* Set name
*
* @param string $name
* @return Hotels
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
/**
* Set categorycode
*
* @param string $categorycode
* @return Hotels
*/
public function setCategorycode($categorycode)
{
$this->categorycode = $categorycode;
return $this;
}
/**
* Get categorycode
*
* @return string
*/
public function getCategorycode()
{
return $this->categorycode;
}
/**
* Set destinationcode
*
* @param string $destinationcode
* @return Hotels
*/
public function setDestinationcode($destinationcode)
{
$this->destinationcode = $destinationcode;
return $this;
}
/**
* Get destinationcode
*
* @return string
*/
public function getDestinationcode()
{
return $this->destinationcode;
}
/**
* Set zonecode
*
* @param string $zonecode
* @return Hotels
*/
public function setZonecode($zonecode)
{
$this->zonecode = $zonecode;
return $this;
}
/**
* Get zonecode
*
* @return string
*/
public function getZonecode()
{
return $this->zonecode;
}
/**
* Set chaincode
*
* @param string $chaincode
* @return Hotels
*/
public function setChaincode($chaincode)
{
$this->chaincode = $chaincode;
return $this;
}
/**
* Get chaincode
*
* @return string
*/
public function getChaincode()
{
return $this->chaincode;
}
/**
* Set licence
*
* @param string $licence
* @return Hotels
*/
public function setLicence($licence)
{
$this->licence = $licence;
return $this;
}
/**
* Get licence
*
* @return string
*/
public function getLicence()
{
return $this->licence;
}
/**
* Set latitude
*
* @param string $latitude
* @return Hotels
*/
public function setLatitude($latitude)
{
$this->latitude = $latitude;
return $this;
}
/**
* Get latitude
*
* @return string
*/
public function getLatitude()
{
return $this->latitude;
}
/**
* Set longitude
*
* @param string $longitude
* @return Hotels
*/
public function setLongitude($longitude)
{
$this->longitude = $longitude;
return $this;
}
/**
* Get longitude
*
* @return string
*/
public function getLongitude()
{
return $this->longitude;
}
}
HotelDescriptions: |