hibernate - Using distinct with Column Value within Constructor Query of HQL -


i want retrieve records based on distinct lab number database. problem have there multiple labs taken patient , multiple lab numbers stored in joined tables.
here query:

 select distinct new org.laborders.dto.laborderdto(ps.labnumber,ps.patientserviceid,  ps,patientname,pso.patientserviceorderid,pso.totalamount)   patientservices ps join patientservicesorder pso 

i want retrieve unique records on ps.labnumber.

have tried -

select distinct new  org.laborders.dto.laborderdto(ps.labnumber,ps.patientserviceid, ps,patientname,pso.patientserviceorderid,pso.totalamount)  patientservices ps join patientservicesorder pso 

look have placed keyword distinct first , new package.class.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -