0
Guys I got a class Arquivo
who has a Manytoone relationship with a class Usuario
working right. I need to list all the data that are in the class Arquivo
s including relationships. How I do that in Doctrine?
Class relationship File is so:
/**
* @ORM\ManyToOne(targetEntity="JN\Entity\Usuarios\Usuario", cascade={"persist"})
* @ORM\JoinColumn(name="usuario_id", referencedColumnName="id", onDelete="SET NULL")
**/
private $usuario;
When I do so on Doctrine I don’t return the content of the relationship:
$ent = $this->em->getRepository( "JN\Entity\Arquivos\Arquivo" )
->createQueryBuilder('t')
->getQuery()
->getArrayResult();
Thank you gave it right.
– Joao Nivaldo