java - Fetch not repeated rows in hibernate -


i fetch list query in hibernate without repeated elements.

currently have like:

select t table t join fetch t.list tl tl.userid=:userid , tl.tableid=t.id 

this works good! problem returns same object many times userid in tl

so lets userid found 3 times in tl getting:

t   tl1   tl2   tl3 t   tl1   tl2   tl3 t   tl1   tl2   tl3 

and want get:

t   tl1 t   tl2 t   tl3 

or one:

t   tl1   tl2   tl3 

i guess possible in hibernate havent manage yet.

thanks in advance

do write

select  distinct t table t join fetch t .......       -----^------ 

hql order clause , distinct clause helpful further.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -