From 9bd892adc3a3b3b94cafb897ebc261676999c6ae Mon Sep 17 00:00:00 2001 From: humberto Date: Tue, 28 Nov 2023 13:21:25 +0100 Subject: [PATCH] #36581 fix Jdk 11 test + native Data 3 and 7 --- .../src/main/java/io/quarkus/it/panache/PersonDTO.java | 5 ----- .../io/quarkus/it/panache/PanacheFunctionalityTest.java | 7 ++++++- .../java/io/quarkus/it/panache/reactive/PersonDTO.java | 5 ----- .../it/panache/reactive/PanacheFunctionalityTest.java | 2 ++ 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonDTO.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonDTO.java index 81b9507a20d6b..1cd1890b6de19 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonDTO.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonDTO.java @@ -67,11 +67,6 @@ public DescriptionDTO(Integer height, Integer weight, EmbeddedDescriptionDTO des this.description = "Height: " + height + ", weight: " + weight; } - // Custom constructor for manual query should be put after the one with all parameters - public DescriptionDTO(Integer height, Integer weight) { - this(height, weight, null); - } - public String getGeneratedDescription() { return description; } diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheFunctionalityTest.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheFunctionalityTest.java index 9927b86191d46..093b636910fb5 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheFunctionalityTest.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheFunctionalityTest.java @@ -259,6 +259,7 @@ void testSimpleEntityProjection() { void testSimpleEntityProjection2() { Person person = new Person(); person.name = "1"; + person.uniqueName = "1"; person.persist(); String personName = Person.find("select name from Person2 where name = ?1", "1") @@ -279,7 +280,10 @@ void testNestedEntityProjection_WithQuery() { "select uniqueName, name, " + " new io.quarkus.it.panache.PersonDTO$AddressDTO( address.street, address.street, address.street)," + " new io.quarkus.it.panache.PersonDTO$AddressDTO( address.street, address.street, address.street)," + - " new io.quarkus.it.panache.PersonDTO$DescriptionDTO(description.size, description.weight)," + + " new io.quarkus.it.panache.PersonDTO$DescriptionDTO(description.size, description.weight, " + + " new io.quarkus.it.panache.PersonDTO$EmbeddedDescriptionDTO(description.description2.embeddedDescription)" + + + ")," + " description.size" + " from Person2 where name = ?1", "2") @@ -295,6 +299,7 @@ void testNestedEntityProjection_WithQuery() { void testNestedEntityProjection() { Person person = new Person(); person.name = "3"; + person.uniqueName = "3"; person.address = new Address("street 3"); person.description = new PersonDescription(); person.description.weight = 75; diff --git a/integration-tests/hibernate-reactive-panache/src/main/java/io/quarkus/it/panache/reactive/PersonDTO.java b/integration-tests/hibernate-reactive-panache/src/main/java/io/quarkus/it/panache/reactive/PersonDTO.java index ffe38806cfcd3..b4fdcae5bb82e 100644 --- a/integration-tests/hibernate-reactive-panache/src/main/java/io/quarkus/it/panache/reactive/PersonDTO.java +++ b/integration-tests/hibernate-reactive-panache/src/main/java/io/quarkus/it/panache/reactive/PersonDTO.java @@ -67,11 +67,6 @@ public DescriptionDTO(Integer height, Integer weight, EmbeddedDescriptionDTO des this.description = "Height: " + height + ", weight: " + weight; } - // Custom constructor for manual query should be put after the one with all parameters - public DescriptionDTO(Integer height, Integer weight) { - this(height, weight, null); - } - public String getGeneratedDescription() { return description; } diff --git a/integration-tests/hibernate-reactive-panache/src/test/java/io/quarkus/it/panache/reactive/PanacheFunctionalityTest.java b/integration-tests/hibernate-reactive-panache/src/test/java/io/quarkus/it/panache/reactive/PanacheFunctionalityTest.java index ad085c0e79988..a124148689282 100644 --- a/integration-tests/hibernate-reactive-panache/src/test/java/io/quarkus/it/panache/reactive/PanacheFunctionalityTest.java +++ b/integration-tests/hibernate-reactive-panache/src/test/java/io/quarkus/it/panache/reactive/PanacheFunctionalityTest.java @@ -310,6 +310,7 @@ public void testBeerRepository() { void testSelectNameProjection(UniAsserter asserter) { Person person = new Person(); person.name = "1"; + person.uniqueName = "1"; asserter.execute(() -> person.persist()); asserter.assertThat( () -> Person.find("select name from Person2 where name = ?1", "1") @@ -326,6 +327,7 @@ void testSelectNameProjection(UniAsserter asserter) { void testNestedEntityProjection(UniAsserter asserter) { Person person = new Person(); person.name = "3"; + person.uniqueName = "3"; person.address = new Address("street 3"); person.description = new PersonDescription(); person.description.weight = 75;