Merge pull request #14166 from timis1/JAVA-20167_1
JAVA-20167 Migrate spring-data-mongodb to JDK 17
This commit is contained in:
commit
6301d6f118
|
@ -40,8 +40,6 @@
|
|||
<module>java-jpa</module> <!-- long running -->
|
||||
<module>java-jpa-2</module>
|
||||
<module>java-jpa-3</module>
|
||||
<!-- enable it when persistence-modules is migrated to JDK9+ -->
|
||||
<!-- <module>java-mongodb</module>--> <!-- long running -->
|
||||
<module>java-mongodb-2</module> <!-- long running -->
|
||||
<module>java-mongodb-3</module> <!-- long running -->
|
||||
<module>java-mongodb-queries</module> <!-- long running -->
|
||||
|
@ -90,7 +88,7 @@
|
|||
<module>spring-data-jpa-repo-2</module>
|
||||
<module>spring-data-jdbc</module>
|
||||
<module>spring-data-keyvalue</module>
|
||||
<!-- <module>spring-data-mongodb</module> FAILED -->
|
||||
<module>spring-data-mongodb</module>
|
||||
<module>spring-data-mongodb-2</module>
|
||||
<module>spring-data-mongodb-reactive</module>
|
||||
<module>spring-data-redis</module>
|
||||
|
|
|
@ -51,12 +51,9 @@ public interface UserRepository extends JpaRepository<User, Integer> {
|
|||
|
||||
List<User> findByAgeIn(Collection<Integer> ages);
|
||||
|
||||
@Query(value = "select * from users where (name = :nameParam OR birth_date <> :birthDateParam)", nativeQuery = true)
|
||||
List<User> findByNameOrBirthDate(@Param(value = "nameParam") String nameParam, @Param(value = "birthDateParam") ZonedDateTime birthDateParam);
|
||||
List<User> findByNameOrAge(String name, Integer age);
|
||||
|
||||
@Query(value = "select * from users where (name = :nameParam OR birth_date <> :birthDateParam) and active = :activeParam", nativeQuery = true)
|
||||
List<User> findByNameOrBirthDateAndActive(@Param(value = "nameParam") String nameParam, @Param(value = "birthDateParam") ZonedDateTime birthDateParam,
|
||||
@Param(value = "activeParam") Boolean activeParam);
|
||||
List<User> findByNameOrAgeAndActive(String name, Integer age, Boolean active);
|
||||
|
||||
List<User> findByNameOrderByName(String name);
|
||||
|
||||
|
|
|
@ -153,15 +153,15 @@ public class UserRepositoryIntegrationTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
public void whenByNameOrBirthDate() {
|
||||
public void whenByNameOrAge() {
|
||||
|
||||
assertEquals(4, userRepository.findByNameOrBirthDate(USER_NAME_ADAM, BIRTHDATE).size());
|
||||
assertEquals(3, userRepository.findByNameOrAge(USER_NAME_ADAM, 20).size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void whenByNameOrBirthDateAndActive() {
|
||||
public void whenByNameOrAgeAndActive() {
|
||||
|
||||
assertEquals(2, userRepository.findByNameOrBirthDateAndActive(USER_NAME_ADAM, BIRTHDATE, false).size());
|
||||
assertEquals(2, userRepository.findByNameOrAgeAndActive(USER_NAME_ADAM, 20, false).size());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -103,13 +103,13 @@
|
|||
</build>
|
||||
|
||||
<properties>
|
||||
<org.springframework.data.version>3.0.3.RELEASE</org.springframework.data.version>
|
||||
<querydsl.version>4.3.1</querydsl.version>
|
||||
<org.springframework.data.version>3.4.7</org.springframework.data.version>
|
||||
<querydsl.version>5.0.0</querydsl.version>
|
||||
<mysema.maven.version>1.1.3</mysema.maven.version>
|
||||
<mongodb-reactivestreams.version>4.1.0</mongodb-reactivestreams.version>
|
||||
<projectreactor.version>3.2.0.RELEASE</projectreactor.version>
|
||||
<mongodb-driver.version>4.0.5</mongodb-driver.version>
|
||||
<embed.mongo.version>3.2.6</embed.mongo.version>
|
||||
<projectreactor.version>3.5.4</projectreactor.version>
|
||||
<mongodb-driver.version>4.6.1</mongodb-driver.version>
|
||||
<embed.mongo.version>4.6.3</embed.mongo.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
Loading…
Reference in New Issue