Tema: Error en DQL
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/05/2013, 12:14
wilmer30
 
Fecha de Ingreso: enero-2010
Mensajes: 491
Antigüedad: 14 años, 3 meses
Puntos: 12
Error en DQL

Hola:

Tengo este DQL que me da error:
Código PHP:
$role $this->em->createQuery('SELECT h.role FROM Application\Entity\Histousuario h WHERE (h.id = :id)');
$role->setParameters(array(
    
':id' => $id
)); 
role, asi esta en mi entidad
Cita:
* @ORM\ManyToOne(targetEntity="Application\Entity\Ro les")
* @ORM\JoinColumns({
* @ORM\JoinColumn(name="role_id", referencedColumnName="id", nullable=true, onDelete="SET NULL")
* })
*/
private $role;
el error que me muestra es este:
Cita:
Fatal error: Uncaught exception 'Doctrine\ORM\Query\QueryException' with message 'SELECT h.role FROM Application\Entity\Histousuario h WHERE (h.id = :id)' in C:\xampp\htdocs\bcbtram\library\Doctrine\ORM\Query \QueryException.php:39