Foros de discusión

how to use distinct in dynamic query

thumbnail
Florencia Gadea, modificado hace 11 años.

how to use distinct in dynamic query

Regular Member Mensajes: 146 Fecha de incorporación: 27/03/12 Mensajes recientes
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.