DATACMNS-15 - Applied distinct flag from PartTree to query.
This commit is contained in:
@@ -63,7 +63,7 @@ public class JpaQueryCreator extends
|
||||
super(tree, parameters);
|
||||
|
||||
this.builder = em.getCriteriaBuilder();
|
||||
this.query = builder.createQuery();
|
||||
this.query = builder.createQuery().distinct(tree.isDistinct());
|
||||
this.root = query.from(domainClass);
|
||||
}
|
||||
|
||||
|
||||
@@ -592,6 +592,7 @@ public class UserRepositoryTests {
|
||||
|
||||
List<User> result =
|
||||
repository.findByLastnameLikeOrderByFirstnameDesc("%r%");
|
||||
assertThat(result.size(), is(2));
|
||||
assertEquals(firstUser, result.get(0));
|
||||
assertEquals(secondUser, result.get(1));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user