Skip to content

Commit

Permalink
quarkusio#36581 fix Jdk 11 test + native Data 3 and 7
Browse files Browse the repository at this point in the history
  • Loading branch information
humcqc committed Jan 28, 2024
1 parent 9b21d20 commit 60d2844
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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;
Expand Down

0 comments on commit 60d2844

Please sign in to comment.