[JAVA-13976] Fix integration tests after Spring Boot upgrade to 2.7.2 (#12647)

This commit is contained in:
Haroon Khan
2022-08-25 17:00:13 +01:00
committed by GitHub
parent 1a5a959265
commit c779eb6331
49 changed files with 150 additions and 118 deletions

View File

@@ -21,7 +21,7 @@ public interface UserRepository extends JpaRepository<User, Integer> , UserRepos
@Query("SELECT u FROM User u WHERE u.status = 1")
Collection<User> findAllActiveUsers();
@Query("select u from User u where u.email like '%@gmail.com'")
List<User> findUsersWithGmailAddress();
@@ -75,14 +75,14 @@ public interface UserRepository extends JpaRepository<User, Integer> , UserRepos
@Query(value = "INSERT INTO Users (name, age, email, status, active) VALUES (:name, :age, :email, :status, :active)", nativeQuery = true)
@Modifying
void insertUser(@Param("name") String name, @Param("age") Integer age, @Param("email") String email, @Param("status") Integer status, @Param("active") boolean active);
@Modifying
@Query(value = "UPDATE Users u SET status = ? WHERE u.name = ?", nativeQuery = true)
int updateUserSetStatusForNameNativePostgres(Integer status, String name);
@Query(value = "SELECT u FROM User u WHERE u.name IN :names")
List<User> findUserByNameList(@Param("names") Collection<String> names);
void deleteAllByCreationDateAfter(LocalDate date);
@Modifying(clearAutomatically = true, flushAutomatically = true)
@@ -97,6 +97,6 @@ public interface UserRepository extends JpaRepository<User, Integer> , UserRepos
int deleteDeactivatedUsersWithNoModifyingAnnotation();
@Modifying(clearAutomatically = true, flushAutomatically = true)
@Query(value = "alter table USERS add column deleted int(1) not null default 0", nativeQuery = true)
@Query(value = "alter table USERS add column deleted int not null default 0", nativeQuery = true)
void addDeletedColumn();
}