0
I have an entity called Pessoa
. This entity has a phone list of the entity Telefone
.
How do I bring the person information and popular the phone list of this person in a select
with only hql
?
When using the query select u FROM Pessoa
, many data are returned. I would like to optimize and bring only the fields código
, nome
and the telephone list.
The expected result would be equal to this:
Thank you for your attention
Ever tried a Join? , then just get the records in select, ex:
select u, t.telefone
– DiegoAugusto
Post the entity code
Pessoa
andTelefone
, please– igventurelli