-
Notifications
You must be signed in to change notification settings - Fork 174
Closed
Description
I having and issue with an Entity that has a @ManyToMany
association. It's a Store
and a StoreCategory
many stores can be associated to many categories.
I have an Specification
to search (like) the associated categories. And after:
dataTablesOutput = dataTableRepository.findAll(input, allColumnsSpecs);
As you can see i have 2 recordsTotal and 3 recordsFiltered so after filtering I have more records than the total. And as you can see, items 0 and 1 are the same Entity.
What I'm doing to solve this is remove duplicates like this:
List<Integer> listWithDuplicates = Lists.newArrayList(5, 0, 3, 1, 2, 3, 0, 0);
List<Integer> listWithoutDuplicates = new ArrayList<>(
new LinkedHashSet<>(listWithDuplicates));
Is this a bug or am I doing something wrong?
Metadata
Metadata
Assignees
Labels
No labels