[JAVA-13976] Fix integration tests after Spring Boot upgrade to 2.7.2 (#12647)
This commit is contained in:
@@ -21,7 +21,7 @@ public interface CommentRepository extends JpaRepository<Comment, Integer> {
|
||||
@Query("SELECT c.year AS yearComment, COUNT(c.year) AS totalComment FROM Comment AS c GROUP BY c.year ORDER BY c.year DESC")
|
||||
List<ICommentCount> countTotalCommentsByYearInterface();
|
||||
|
||||
@Query(value = "SELECT c.year AS yearComment, COUNT(c.*) AS totalComment FROM comment AS c GROUP BY c.year ORDER BY c.year DESC", nativeQuery = true)
|
||||
@Query(value = "SELECT c.\"year\" AS yearComment, COUNT(c.*) AS totalComment FROM \"comment\" AS c GROUP BY c.\"year\" ORDER BY c.\"year\" DESC", nativeQuery = true)
|
||||
List<ICommentCount> countTotalCommentsByYearNative();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
spring.jpa.show-sql=false
|
||||
spring.jpa.defer-datasource-initialization=true
|
||||
spring.jpa.defer-datasource-initialization=true
|
||||
|
||||
spring.jpa.properties.hibernate.globally_quoted_identifiers=true
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
INSERT INTO department (id, name) VALUES (1, 'Infra');
|
||||
INSERT INTO department (id, name) VALUES (2, 'Accounting');
|
||||
INSERT INTO department (id, name) VALUES (3, 'Management');
|
||||
INSERT INTO "department" ("id", "name") VALUES (1, 'Infra');
|
||||
INSERT INTO "department" ("id", "name") VALUES (2, 'Accounting');
|
||||
INSERT INTO "department" ("id", "name") VALUES (3, 'Management');
|
||||
|
||||
INSERT INTO joins_employee (id, name, age, department_id) VALUES (1, 'Baeldung', '35', 1);
|
||||
INSERT INTO joins_employee (id, name, age, department_id) VALUES (2, 'John', '35', 2);
|
||||
INSERT INTO joins_employee (id, name, age, department_id) VALUES (3, 'Jane', '35', 2);
|
||||
INSERT INTO "joins_employee" ("id", "name", "age", "department_id") VALUES (1, 'Baeldung', '35', 1);
|
||||
INSERT INTO "joins_employee" ("id", "name", "age", "department_id") VALUES (2, 'John', '35', 2);
|
||||
INSERT INTO "joins_employee" ("id", "name", "age", "department_id") VALUES (3, 'Jane', '35', 2);
|
||||
|
||||
INSERT INTO phone (id, number, employee_id) VALUES (1, '111', 1);
|
||||
INSERT INTO phone (id, number, employee_id) VALUES (2, '222', 1);
|
||||
INSERT INTO phone (id, number, employee_id) VALUES (3, '333', 1);
|
||||
INSERT INTO "phone" ("id", "number", "employee_id") VALUES (1, '111', 1);
|
||||
INSERT INTO "phone" ("id", "number", "employee_id") VALUES (2, '222', 1);
|
||||
INSERT INTO "phone" ("id", "number", "employee_id") VALUES (3, '333', 1);
|
||||
|
||||
COMMIT;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
INSERT INTO Item(id,name) VALUES (1,'Table');
|
||||
INSERT INTO Item(id,name) VALUES (2,'Bottle');
|
||||
INSERT INTO "item" ("id", "name") VALUES (1,'Table');
|
||||
INSERT INTO "item" ("id", "name") VALUES (2,'Bottle');
|
||||
|
||||
INSERT INTO Characteristic(id,item_id, type) VALUES (1,1,'Rigid');
|
||||
INSERT INTO Characteristic(id,item_id,type) VALUES (2,1,'Big');
|
||||
INSERT INTO Characteristic(id,item_id,type) VALUES (3,2,'Fragile');
|
||||
INSERT INTO Characteristic(id,item_id,type) VALUES (4,2,'Small');
|
||||
INSERT INTO "characteristic" ("id", "item_id", "type") VALUES (1,1,'Rigid');
|
||||
INSERT INTO "characteristic" ("id", "item_id", "type") VALUES (2,1,'Big');
|
||||
INSERT INTO "characteristic" ("id", "item_id", "type") VALUES (3,2,'Fragile');
|
||||
INSERT INTO "characteristic" ("id", "item_id", "type") VALUES (4,2,'Small');
|
||||
@@ -1,7 +1,7 @@
|
||||
INSERT INTO post (id, title, content) VALUES (1, 'Comment 1', 'Content 1');
|
||||
INSERT INTO post (id, title, content) VALUES (2, 'Comment 2', 'Content 2');
|
||||
INSERT INTO post (id, title, content) VALUES (3, 'Comment 3', 'Content 3');
|
||||
INSERT INTO comment (id, year, approved, content, post_id) VALUES (1, 2019, false, 'Comment 1', 1);
|
||||
INSERT INTO comment (id, year, approved, content, post_id) VALUES (2, 2018, true, 'Comment 2', 1);
|
||||
INSERT INTO comment (id, year, approved, content, post_id) VALUES (3, 2018, true, 'Comment 3', 2);
|
||||
INSERT INTO comment (id, year, approved, content, post_id) VALUES (4, 2017, false, 'Comment 4', 3);
|
||||
INSERT INTO "post" ("id", "title", "content") VALUES (1, 'Comment 1', 'Content 1');
|
||||
INSERT INTO "post" ("id", "title", "content") VALUES (2, 'Comment 2', 'Content 2');
|
||||
INSERT INTO "post" ("id", "title", "content") VALUES (3, 'Comment 3', 'Content 3');
|
||||
INSERT INTO "comment" ("id", "year", "approved", "content", "post_id") VALUES (1, 2019, false, 'Comment 1', 1);
|
||||
INSERT INTO "comment" ("id", "year", "approved", "content", "post_id") VALUES (2, 2018, true, 'Comment 2', 1);
|
||||
INSERT INTO "comment" ("id", "year", "approved", "content", "post_id") VALUES (3, 2018, true, 'Comment 3', 2);
|
||||
INSERT INTO "comment" ("id", "year", "approved", "content", "post_id") VALUES (4, 2017, false, 'Comment 4', 3);
|
||||
Reference in New Issue
Block a user