diff --git a/extensions/panache/hibernate-orm-panache-common/runtime/src/main/java/io/quarkus/hibernate/orm/panache/common/runtime/CommonPanacheQueryImpl.java b/extensions/panache/hibernate-orm-panache-common/runtime/src/main/java/io/quarkus/hibernate/orm/panache/common/runtime/CommonPanacheQueryImpl.java index 6643f64e5a6b49..e316768572f1fb 100644 --- a/extensions/panache/hibernate-orm-panache-common/runtime/src/main/java/io/quarkus/hibernate/orm/panache/common/runtime/CommonPanacheQueryImpl.java +++ b/extensions/panache/hibernate-orm-panache-common/runtime/src/main/java/io/quarkus/hibernate/orm/panache/common/runtime/CommonPanacheQueryImpl.java @@ -122,9 +122,7 @@ public CommonPanacheQueryImpl project(Class type) { } // build select clause with a constructor expression - StringBuilder selectClause = new StringBuilder("SELECT "); - selectClause.append(getParameterFromClass(type, null)); - System.out.println(selectClause); + String selectClause = "SELECT " + getParameterFromClass(type, null); return new CommonPanacheQueryImpl<>(this, selectClause + selectQuery, "select count(*) " + selectQuery); } diff --git a/extensions/panache/hibernate-reactive-panache-common/runtime/src/main/java/io/quarkus/hibernate/reactive/panache/common/runtime/CommonPanacheQueryImpl.java b/extensions/panache/hibernate-reactive-panache-common/runtime/src/main/java/io/quarkus/hibernate/reactive/panache/common/runtime/CommonPanacheQueryImpl.java index 7ececab540d911..0f6e5dbdced0df 100644 --- a/extensions/panache/hibernate-reactive-panache-common/runtime/src/main/java/io/quarkus/hibernate/reactive/panache/common/runtime/CommonPanacheQueryImpl.java +++ b/extensions/panache/hibernate-reactive-panache-common/runtime/src/main/java/io/quarkus/hibernate/reactive/panache/common/runtime/CommonPanacheQueryImpl.java @@ -112,9 +112,7 @@ public CommonPanacheQueryImpl project(Class type) { } // build select clause with a constructor expression - StringBuilder selectClause = new StringBuilder("SELECT "); - selectClause.append(getParameterFromClass(type, null)); - System.out.println(selectClause); + String selectClause = "SELECT " + getParameterFromClass(type, null); return new CommonPanacheQueryImpl<>(this, selectClause + selectQuery, "select count(*) " + selectQuery); } 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 c3bbc1e142edc8..ad085c0e79988f 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 @@ -364,6 +364,7 @@ void testDogDto2Projection(UniAsserter asserter) { .project(DogDto2.class) .firstResult(), dogDto2 -> { + Assertions.assertNotNull(dogDto2); Assertions.assertEquals("kit", dogDto2.name); Assertions.assertEquals("hum", dogDto2.owner.name); });