17/12/2012, 14:01
|
| | 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 Es un typo o te falta definir el alias de Facilites ?, una sugerencia, si quieres obtener un solo resultado puedes utilizar getSingleResult(ten en cuenta que si no existe el resultado hace throw de Doctrine\Orm\NoResultException)
Saludos. lo que sucede esque en realidad necesito utilizar como aprox. 10 tablas,... y necesito que me regresen varios resultados :S, porque algunas tablas no se encuentran relacionadas, entonces lo que estoy intentando hacer es hacer consulta a todas las tablas que tienen la base de datos, para que de ellas saque la información correspondiente que ocupo...
y abimex, si estoy verificando los datos, y cada una de esas entitades que ingreso si son correctas, de igual forma la de facilities si existe... :S
de echo mi entidad "Facilities" esta asi:
Código:
<?
namespace cnt\HBBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use cnt\HBBundle\Entity\FacilityTypes;
use Symfony\Component\Validator\Constrainst as Assert;
/**
* @ORM\Entity()
* @ORM\Table(name="FACILITIES")
*/
class Facilities
{
/**
* @ORM\Id
* @ORM\Column(name="HOTELCODE",type="string", length=8, nullable=false, unique=true)
*/
protected $hotelcode;
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity="FACILITY_TYPES", inversedBy="FACILITIES")
* @ORM\Column(name="CODE",type="string", length=3, nullable=false)
*/
protected $code;
/**
* @ORM\Id
* @ORM\ManyToOne(targetEntity="FACILITY_TYPES", inversedBy="FACLITIES")
* @ORM\Column(name="GROUP_",type="string", length=3, nullable=false)
*/
protected $group;
/**
* @ORM\Id
* @ORM\Column(name="ORDER_", type="string", length=8, nullable=false)
*/
protected $order;
/**
* @ORM\Column(name="NUMBER_", type="string", length=9, nullable=true)
*/
protected $number=null;
/**
* @ORM\Column(name="LOGIC",type="string", length=1, nullable=true)
*/
protected $logic=null;
/**
* @ORM\Column(name="FEE",type="string", length=1, nullable=true)
*/
protected $fee=null;
/**
* @ORM\Column(name="DISTANCE", type="string", length=9, nullable=true)
*/
protected $distance=null;
/**
* @ORM\Column(name="WALKINGDISTANCE",type="string", length=9, nullable=true)
*/
protected $walkingdistance=null;
/**
* @ORM\Column(name="TRANSPORTDISTANCE",type="string", length=9, nullable=true)
*/
protected $transportdistance=null;
/**
* @ORM\Column(name="CARDISTANCE",type="string", length=9, nullable=true)
*/
protected $cardistance=null;
/**
* @ORM\Column(name="AGEFROM",type="string", length=3, nullable=true)
*/
protected $agefrom=null;
/**
* @ORM\Column(name="AGETO",type="string", length=3, nullable=true)
*/
protected $ageto=null;
/**
* @ORM\Column(name="BEACHACCESS",type="string", length=1, nullable=true)
*/
protected $beachaccess=null;
/**
* @ORM\Column(name="BEACHAPART", type="string", length=1, nullable=true)
*/
protected $beachapart=null;
/**
* @ORM\Column(name="CONCEPT",type="string", length=100, nullable=true)
*/
protected $concept=null;
/**
* Set hotelcode
*
* @param string $hotelcode
* @return Facilities
*/
public function setHotelcode($hotelcode)
{
$this->hotelcode = $hotelcode;
return $this;
}
/**
* Get hotelcode
*
* @return string
*/
public function getHotelcode()
{
return $this->hotelcode;
}
/**
* Set code
*
* @param string $code
* @return Facilities
*/
public function setCode($code)
{
$this->code = $code;
return $this;
}
/**
* Get code
*
* @return string
*/
public function getCode()
{
return $this->code;
}
/**
* Set group
*
* @param string $group
* @return Facilities
*/
public function setGroup($group)
{
$this->group = $group;
return $this;
}
/**
* Get group
*
* @return string
*/
public function getGroup()
{
return $this->group;
}
/**
* Set order
*
* @param string $order
* @return Facilities
*/
public function setOrder($order)
{
$this->order = $order;
return $this;
}
/**
* Get order
*
* @return string
*/
public function getOrder()
{
return $this->order;
}
/**
* Set number
*
* @param string $number
* @return Facilities
*/
public function setNumber($number)
{
$this->number = $number;
return $this;
}
/**
* Get number
*
* @return string
*/
public function getNumber()
{
return $this->number;
}
/**
* Set logic
*
* @param string $logic
* @return Facilities
*/
public function setLogic($logic)
{
$this->logic = $logic;
return $this;
}
/**
* Get logic
*
* @return string
*/
public function getLogic()
{
return $this->logic;
}
/**
* Set fee
*
* @param string $fee
* @return Facilities
*/
public function setFee($fee)
{
$this->fee = $fee;
return $this;
}
/**
* Get fee
*
* @return string
*/
public function getFee()
{
return $this->fee;
}
/**
* Set distance
*
* @param string $distance
* @return Facilities
*/
public function setDistance($distance)
{
$this->distance = $distance;
return $this;
}
/**
* Get distance
*
* @return string
*/
public function getDistance()
{
return $this->distance;
}
/**
* Set walkingdistance
*
* @param string $walkingdistance
* @return Facilities
*/
public function setWalkingdistance($walkingdistance)
{
$this->walkingdistance = $walkingdistance;
return $this;
}
/**
* Get walkingdistance
*
* @return string
*/
public function getWalkingdistance()
{
return $this->walkingdistance;
}
/**
* Set transportdistance
*
* @param string $transportdistance
* @return Facilities
*/
public function setTransportdistance($transportdistance)
{
$this->transportdistance = $transportdistance;
return $this;
}
/**
* Get transportdistance
*
* @return string
*/
public function getTransportdistance()
{
return $this->transportdistance;
}
/**
* Set cardistance
*
* @param string $cardistance
* @return Facilities
*/
public function setCardistance($cardistance)
{
$this->cardistance = $cardistance;
return $this;
}
/**
* Get cardistance
*
* @return string
*/
public function getCardistance()
{
return $this->cardistance;
}
/**
* Set agefrom
*
* @param string $agefrom
* @return Facilities
*/
public function setAgefrom($agefrom)
{
$this->agefrom = $agefrom;
return $this;
}
/**
* Get agefrom
*
* @return string
*/
public function getAgefrom()
{
return $this->agefrom;
}
/**
* Set ageto
*
* @param string $ageto
* @return Facilities
*/
public function setAgeto($ageto)
{
$this->ageto = $ageto;
return $this;
}
/**
* Get ageto
*
* @return string
*/
public function getAgeto()
{
return $this->ageto;
}
/**
* Set beachaccess
*
* @param string $beachaccess
* @return Facilities
*/
public function setBeachaccess($beachaccess)
{
$this->beachaccess = $beachaccess;
return $this;
}
/**
* Get beachaccess
*
* @return string
*/
public function getBeachaccess()
{
return $this->beachaccess;
}
/**
* Set beachapart
*
* @param string $beachapart
* @return Facilities
*/
public function setBeachapart($beachapart)
{
$this->beachapart = $beachapart;
return $this;
}
/**
* Get beachapart
*
* @return string
*/
public function getBeachapart()
{
return $this->beachapart;
}
/**
* Set concept
*
* @param string $concept
* @return Facilities
*/
public function setConcept($concept)
{
$this->concept = $concept;
return $this;
}
/**
* Get concept
*
* @return string
*/
public function getConcept()
{
return $this->concept;
}
}
|