I am currently getting duplicate results using hibernate using CriteriaBuilder.
I have a table that stores an event identifier and a connection table that stores several values ββthat have an identifier in another table. For instance,
event
ID .... --------- 1123 1124 1125
join table
ID event_id tag_id ---------------------- 1 1124 2 2 1124 3 3 1123 6 4 1123 7
tag
ID tag --------- 1 Dance 2 Hiphop ...
This will obviously lead to double results. For instance.
eventID ... tag_id tag -------------------- 1124 2 Hiphop 1124 3 Dance
Is it possible that inside hibernate CriteriaBuilder get this result:
eventID ... tag_id tag -------------------- 1124 2,3 Hiphop, Dance
I saw several solutions in the SQL server itself, but I can not find it using hibernate CriteriaBuilder.
source share