Fórum

how to use distinct in dynamic query

thumbnail
Florencia Gadea, modificado 11 Anos atrás.

how to use distinct in dynamic query

Regular Member Postagens: 146 Data de Entrada: 27/03/12 Postagens Recentes
Hi Everyone,

I would like to perform a query like this:

select distinct field1, field2, field3, field4 from table;


table is an entity I created.

If I do it with dynamicquery, I have to use setProjection, and there I have a problem casting to my entity, I can't do it.

Regards,

Florencia.