From dceb5781a0023d8d7faf1c9e919815a387102e54 Mon Sep 17 00:00:00 2001 From: rstoyanchev Date: Mon, 15 May 2023 15:18:06 +0100 Subject: [PATCH] Upgrade to Hibernate 6.2.2 --- platform/build.gradle | 2 +- .../jpa/QueryByExampleDataFetcherJpaTests.java | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/platform/build.gradle b/platform/build.gradle index f66ca302..3d321d31 100644 --- a/platform/build.gradle +++ b/platform/build.gradle @@ -39,7 +39,7 @@ dependencies { api("org.skyscreamer:jsonassert:1.5.1") api("com.h2database:h2:2.1.214") - api("org.hibernate:hibernate-core:6.1.7.Final") + api("org.hibernate:hibernate-core:6.2.2.Final") api("org.hibernate.validator:hibernate-validator:8.0.0.Final") api("org.mongodb:bson:4.9.1") api("org.mongodb:mongodb-driver-core:4.9.1") diff --git a/spring-graphql/src/test/java/org/springframework/graphql/data/query/jpa/QueryByExampleDataFetcherJpaTests.java b/spring-graphql/src/test/java/org/springframework/graphql/data/query/jpa/QueryByExampleDataFetcherJpaTests.java index b75c50a2..7818269d 100644 --- a/spring-graphql/src/test/java/org/springframework/graphql/data/query/jpa/QueryByExampleDataFetcherJpaTests.java +++ b/spring-graphql/src/test/java/org/springframework/graphql/data/query/jpa/QueryByExampleDataFetcherJpaTests.java @@ -81,7 +81,7 @@ class QueryByExampleDataFetcherJpaTests { @Test void shouldFetchSingleItems() { - Book book = new Book(42L, "Hitchhiker's Guide to the Galaxy", new Author(0L, "Douglas", "Adams")); + Book book = new Book(42L, "Hitchhiker's Guide to the Galaxy", new Author(105L, "Douglas", "Adams")); repository.save(book); Consumer tester = setup -> { @@ -101,8 +101,8 @@ class QueryByExampleDataFetcherJpaTests { @Test void shouldFetchMultipleItems() { - Book book1 = new Book(42L, "Hitchhiker's Guide to the Galaxy", new Author(0L, "Douglas", "Adams")); - Book book2 = new Book(53L, "Breaking Bad", new Author(0L, "", "Heisenberg")); + Book book1 = new Book(42L, "Hitchhiker's Guide to the Galaxy", new Author(105L, "Douglas", "Adams")); + Book book2 = new Book(53L, "Breaking Bad", new Author(106L, "Vince", "Gilligan")); repository.saveAll(Arrays.asList(book1, book2)); Consumer tester = graphQlSetup -> { @@ -128,11 +128,11 @@ class QueryByExampleDataFetcherJpaTests { void shouldFetchWindow() { repository.saveAll(List.of( - new Book(1L, "Nineteen Eighty-Four", new Author(0L, "George", "Orwell")), - new Book(2L, "The Great Gatsby", new Author(0L, "F. Scott", "Fitzgerald")), - new Book(3L, "Catch-22", new Author(0L, "Joseph", "Heller")), - new Book(42L, "Hitchhiker's Guide to the Galaxy", new Author(0L, "Douglas", "Adams")), - new Book(53L, "Breaking Bad", new Author(0L, "", "Heisenberg")))); + new Book(1L, "Nineteen Eighty-Four", new Author(101L, "George", "Orwell")), + new Book(2L, "The Great Gatsby", new Author(102L, "F. Scott", "Fitzgerald")), + new Book(3L, "Catch-22", new Author(103L, "Joseph", "Heller")), + new Book(42L, "Hitchhiker's Guide to the Galaxy", new Author(105L, "Douglas", "Adams")), + new Book(53L, "Breaking Bad", new Author(106L, "Vince", "Gilligan")))); Consumer tester = graphQlSetup -> { @@ -223,7 +223,7 @@ class QueryByExampleDataFetcherJpaTests { @Test void shouldNestForSingleArgumentInputType() { Book book1 = new Book(42L, "Hitchhiker's Guide to the Galaxy", new Author(0L, "Douglas", "Adams")); - Book book2 = new Book(53L, "Breaking Bad", new Author(0L, "", "Heisenberg")); + Book book2 = new Book(53L, "Breaking Bad", new Author(1L, "", "Heisenberg")); repository.saveAll(Arrays.asList(book1, book2)); String queryName = "booksByCriteria";