Problem fetching data from hibernation to many relationships

I have two tables with many relationships, when I apply the findbyall method to this the table will retrieve one record at a time (i.e. the record will be displayed for this table table as many times as there is another relationship with another table) so how can I display each recording only once. Thanks in advance.

0


a source to share


1 answer


Add a "separate" transformer to your Criteria object, for example: crit.setResultTransformer (Criteria.DISTINCT_ROOT_ENTITY);



+1


a source







All Articles