|
42 | 42 | import org.junit.jupiter.params.ParameterizedTest; |
43 | 43 | import org.junit.jupiter.params.provider.Arguments; |
44 | 44 | import org.junit.jupiter.params.provider.MethodSource; |
| 45 | + |
45 | 46 | import org.springframework.beans.factory.annotation.Autowired; |
46 | 47 | import org.springframework.beans.factory.config.PropertiesFactoryBean; |
47 | 48 | import org.springframework.context.ApplicationListener; |
|
51 | 52 | import org.springframework.core.io.ClassPathResource; |
52 | 53 | import org.springframework.dao.IncorrectResultSizeDataAccessException; |
53 | 54 | import org.springframework.data.annotation.Id; |
54 | | -import org.springframework.data.domain.*; |
| 55 | +import org.springframework.data.domain.Example; |
| 56 | +import org.springframework.data.domain.ExampleMatcher; |
| 57 | +import org.springframework.data.domain.Limit; |
| 58 | +import org.springframework.data.domain.Page; |
| 59 | +import org.springframework.data.domain.PageRequest; |
| 60 | +import org.springframework.data.domain.Pageable; |
| 61 | +import org.springframework.data.domain.ScrollPosition; |
| 62 | +import org.springframework.data.domain.Slice; |
| 63 | +import org.springframework.data.domain.Sort; |
| 64 | +import org.springframework.data.domain.Window; |
55 | 65 | import org.springframework.data.jdbc.core.mapping.AggregateReference; |
56 | 66 | import org.springframework.data.jdbc.repository.query.Modifying; |
57 | 67 | import org.springframework.data.jdbc.repository.query.Query; |
@@ -913,19 +923,6 @@ void findAllByExamplePageable(Pageable pageRequest, int size, int totalPages, Li |
913 | 923 | } |
914 | 924 | } |
915 | 925 |
|
916 | | - @Test |
917 | | - void findByExampleWithCollection() { |
918 | | - |
919 | | - List<Root> roots = rootRepository.saveAll(List.of(createRoot("one"), createRoot("two"))); |
920 | | - |
921 | | - Example<Root> example = Example |
922 | | - .of(new Root(null, "one", null, List.of(new Intermediate(null, "peter", null, null)))); |
923 | | - |
924 | | - Iterable<Root> result = rootRepository.findAll(example); |
925 | | - |
926 | | - assertThat(result).contains(roots.get(0)); |
927 | | - } |
928 | | - |
929 | 926 | public static Stream<Arguments> findAllByExamplePageableSource() { |
930 | 927 | return Stream.of( // |
931 | 928 | Arguments.of(PageRequest.of(0, 3), 3, 34, Arrays.asList("3", "4", "100")), // |
@@ -1512,7 +1509,7 @@ interface DummyEntityRepository extends CrudRepository<DummyEntity, Long>, Query |
1512 | 1509 | List<DummyEntity> findByBytes(byte[] bytes); |
1513 | 1510 | } |
1514 | 1511 |
|
1515 | | - interface RootRepository extends ListCrudRepository<Root, Long>, QueryByExampleExecutor<Root> { |
| 1512 | + interface RootRepository extends ListCrudRepository<Root, Long> { |
1516 | 1513 | List<Root> findAllByOrderByIdAsc(); |
1517 | 1514 | } |
1518 | 1515 |
|
|
0 commit comments