From cf5f6bbee8623fb106a97a5926cd9f094b8a5995 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Thu, 8 Aug 2024 12:48:16 +0200 Subject: [PATCH 1/3] Use the proper PU for executeUpdate on entityClass Fixes #42314 Introduced by #41547 --- .../orm/panache/common/runtime/AbstractJpaOperations.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/panache/hibernate-orm-panache-common/runtime/src/main/java/io/quarkus/hibernate/orm/panache/common/runtime/AbstractJpaOperations.java b/extensions/panache/hibernate-orm-panache-common/runtime/src/main/java/io/quarkus/hibernate/orm/panache/common/runtime/AbstractJpaOperations.java index 83d4aca1ad8a9..14594b13d9df1 100644 --- a/extensions/panache/hibernate-orm-panache-common/runtime/src/main/java/io/quarkus/hibernate/orm/panache/common/runtime/AbstractJpaOperations.java +++ b/extensions/panache/hibernate-orm-panache-common/runtime/src/main/java/io/quarkus/hibernate/orm/panache/common/runtime/AbstractJpaOperations.java @@ -482,7 +482,7 @@ public int executeUpdate(Class entityClass, String panacheQuery, Object... pa try { String updateQuery = PanacheJpaUtil.createUpdateQuery(entityClass, panacheQuery, paramCount(params)); - return bindParameters(getSession(DEFAULT_PERSISTENCE_UNIT_NAME).createMutationQuery(updateQuery), params) + return bindParameters(getSession(entityClass).createMutationQuery(updateQuery), params) .executeUpdate(); } catch (RuntimeException x) { throw NamedQueryUtil.checkForNamedQueryMistake(x, panacheQuery); From 83ace0d0e0b748b2c250ec0c6411cfeb39c7045f Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Thu, 8 Aug 2024 13:55:55 +0200 Subject: [PATCH 2/3] Move current classes to a default PU package --- .../it/panache/{ => defaultpu}/AbstractRepository.java | 2 +- .../it/panache/{ => defaultpu}/AccessorEntity.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/Address.java | 2 +- .../quarkus/it/panache/{ => defaultpu}/AddressDao.java | 2 +- .../java/io/quarkus/it/panache/{ => defaultpu}/Beer.java | 2 +- .../it/panache/{ => defaultpu}/BeerRepository.java | 2 +- .../java/io/quarkus/it/panache/{ => defaultpu}/Book.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/BookDao.java | 2 +- .../panache/{ => defaultpu}/Bug5274EntityRepository.java | 2 +- .../{ => defaultpu}/Bug5885AbstractRepository.java | 2 +- .../panache/{ => defaultpu}/Bug5885EntityRepository.java | 2 +- .../it/panache/{ => defaultpu}/Bug7721Entity.java | 2 +- .../panache/{ => defaultpu}/Bug7721EntitySuperClass.java | 2 +- .../it/panache/{ => defaultpu}/Bug7721OtherEntity.java | 2 +- .../java/io/quarkus/it/panache/{ => defaultpu}/Cat.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/CatDto.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/CatOwner.java | 2 +- .../it/panache/{ => defaultpu}/CatProjectionBean.java | 2 +- .../java/io/quarkus/it/panache/{ => defaultpu}/Dog.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/DogDao.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/DogDto.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/DogDto2.java | 2 +- .../it/panache/{ => defaultpu}/DuplicateEntity.java | 2 +- .../it/panache/{ => defaultpu}/DuplicateRepository.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/Fruit.java | 2 +- .../it/panache/{ => defaultpu}/GenericEntity.java | 2 +- .../quarkus/it/panache/{ => defaultpu}/JAXBEntity.java | 2 +- .../{ => defaultpu}/MockablePersonRepository.java | 2 +- .../it/panache/{ => defaultpu}/NamedQueryEntity.java | 2 +- .../{ => defaultpu}/NamedQueryMappedSuperClass.java | 2 +- .../it/panache/{ => defaultpu}/NamedQueryRepository.java | 2 +- .../{ => defaultpu}/NamedQueryWith2QueriesEntity.java | 2 +- .../NamedQueryWith2QueriesRepository.java | 2 +- .../it/panache/{ => defaultpu}/NoPagingTestEndpoint.java | 2 +- .../panache/{ => defaultpu}/ObjectWithCompositeId.java | 2 +- .../panache/{ => defaultpu}/ObjectWithEmbeddableId.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/PageItem.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/Person.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/PersonDTO.java | 2 +- .../it/panache/{ => defaultpu}/PersonDescription.java | 2 +- .../{ => defaultpu}/PersonDescriptionEmbedded.java | 2 +- .../quarkus/it/panache/{ => defaultpu}/PersonName.java | 2 +- .../it/panache/{ => defaultpu}/PersonRepository.java | 2 +- .../io/quarkus/it/panache/{ => defaultpu}/Status.java | 2 +- .../quarkus/it/panache/{ => defaultpu}/TestEndpoint.java | 8 ++++---- .../java/io/quarkus/it/panache/{ => defaultpu}/User.java | 2 +- .../it/panache/{ => defaultpu}/UserRepository.java | 2 +- .../{ => defaultpu}/fk/issue35812/SomeEntity.java | 2 +- .../io/quarkus/it/panache/resources/BookResource.java | 4 ++-- .../io/quarkus/it/panache/resources/UserResource.java | 2 +- .../src/main/resources/application.properties | 1 + .../src/test/java/DefaultPackageWithFastJarPMT.java | 2 +- .../it/panache/{ => defaultpu}/DDLGenerationPMT.java | 2 +- .../it/panache/{ => defaultpu}/DuplicateMethodTest.java | 2 +- .../quarkus/it/panache/{ => defaultpu}/JacksonTest.java | 5 +++-- .../it/panache/{ => defaultpu}/MockPersonRepository.java | 2 +- .../quarkus/it/panache/{ => defaultpu}/NoPagingPMT.java | 2 +- .../PanacheFunctionalityInGraalITCase.java | 2 +- .../{ => defaultpu}/PanacheFunctionalityTest.java | 9 ++++----- .../it/panache/{ => defaultpu}/PanacheMockingTest.java | 2 +- .../{ => defaultpu}/PanacheRepositoryBaseTest.java | 2 +- .../it/panache/{ => defaultpu}/TestResources.java | 2 +- .../TestTransactionOnSingleMethodTest.java | 2 +- .../it/panache/{ => defaultpu}/TestTransactionTest.java | 4 ++-- .../{ => defaultpu}/TransactionalPanacheEntityTest.java | 2 +- .../{ => defaultpu}/TransactionalRepositoryTest.java | 2 +- 66 files changed, 76 insertions(+), 75 deletions(-) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/AbstractRepository.java (78%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/AccessorEntity.java (96%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Address.java (91%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/AddressDao.java (83%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Beer.java (89%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/BeerRepository.java (90%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Book.java (92%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/BookDao.java (83%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Bug5274EntityRepository.java (78%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Bug5885AbstractRepository.java (78%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Bug5885EntityRepository.java (79%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Bug7721Entity.java (95%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Bug7721EntitySuperClass.java (92%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Bug7721OtherEntity.java (86%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Cat.java (92%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/CatDto.java (90%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/CatOwner.java (86%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/CatProjectionBean.java (94%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Dog.java (93%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/DogDao.java (84%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/DogDto.java (90%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/DogDto2.java (92%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/DuplicateEntity.java (94%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/DuplicateRepository.java (91%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Fruit.java (89%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/GenericEntity.java (88%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/JAXBEntity.java (95%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/MockablePersonRepository.java (88%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/NamedQueryEntity.java (86%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/NamedQueryMappedSuperClass.java (89%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/NamedQueryRepository.java (84%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/NamedQueryWith2QueriesEntity.java (91%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/NamedQueryWith2QueriesRepository.java (85%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/NoPagingTestEndpoint.java (90%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/ObjectWithCompositeId.java (96%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/ObjectWithEmbeddableId.java (96%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/PageItem.java (78%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Person.java (99%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/PersonDTO.java (97%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/PersonDescription.java (77%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/PersonDescriptionEmbedded.java (76%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/PersonName.java (88%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/PersonRepository.java (88%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/Status.java (54%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/TestEndpoint.java (99%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/User.java (93%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/UserRepository.java (90%) rename integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/{ => defaultpu}/fk/issue35812/SomeEntity.java (76%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/DDLGenerationPMT.java (97%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/DuplicateMethodTest.java (95%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/JacksonTest.java (71%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/MockPersonRepository.java (91%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/NoPagingPMT.java (98%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/PanacheFunctionalityInGraalITCase.java (84%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/PanacheFunctionalityTest.java (97%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/PanacheMockingTest.java (99%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/PanacheRepositoryBaseTest.java (87%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/TestResources.java (84%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/TestTransactionOnSingleMethodTest.java (96%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/TestTransactionTest.java (92%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/TransactionalPanacheEntityTest.java (92%) rename integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/{ => defaultpu}/TransactionalRepositoryTest.java (93%) diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/AbstractRepository.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/AbstractRepository.java similarity index 78% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/AbstractRepository.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/AbstractRepository.java index 9541d5e706a03..8c5fb88735c6a 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/AbstractRepository.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/AbstractRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import io.quarkus.hibernate.orm.panache.PanacheRepositoryBase; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/AccessorEntity.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/AccessorEntity.java similarity index 96% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/AccessorEntity.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/AccessorEntity.java index 5925ada96e057..db8d9fec751d2 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/AccessorEntity.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/AccessorEntity.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; import jakarta.persistence.Transient; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Address.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Address.java similarity index 91% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Address.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Address.java index 9e4a0552d81cd..fd62bacee7825 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Address.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Address.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/AddressDao.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/AddressDao.java similarity index 83% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/AddressDao.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/AddressDao.java index 748552b781735..fe11ffdbb3438 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/AddressDao.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/AddressDao.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.enterprise.context.ApplicationScoped; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Beer.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Beer.java similarity index 89% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Beer.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Beer.java index 873ee9aadd6b3..db1c71f5ee7b0 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Beer.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Beer.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; import jakarta.transaction.Transactional; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/BeerRepository.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/BeerRepository.java similarity index 90% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/BeerRepository.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/BeerRepository.java index a816a582c8f60..2a2d3eb9f0b25 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/BeerRepository.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/BeerRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import java.util.List; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Book.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Book.java similarity index 92% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Book.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Book.java index a66e82f4cb062..ce323f2493a56 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Book.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Book.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/BookDao.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/BookDao.java similarity index 83% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/BookDao.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/BookDao.java index 5cd8f6131e2ab..695e8cdac972d 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/BookDao.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/BookDao.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.enterprise.context.ApplicationScoped; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug5274EntityRepository.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug5274EntityRepository.java similarity index 78% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug5274EntityRepository.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug5274EntityRepository.java index e45eb251156d7..9fca66ea9677d 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug5274EntityRepository.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug5274EntityRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.enterprise.context.ApplicationScoped; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug5885AbstractRepository.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug5885AbstractRepository.java similarity index 78% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug5885AbstractRepository.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug5885AbstractRepository.java index 0bd118580bf55..48863c1c5355c 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug5885AbstractRepository.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug5885AbstractRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import io.quarkus.hibernate.orm.panache.PanacheRepository; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug5885EntityRepository.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug5885EntityRepository.java similarity index 79% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug5885EntityRepository.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug5885EntityRepository.java index 3f16aa62a542c..6778a6fcdf160 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug5885EntityRepository.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug5885EntityRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.enterprise.context.ApplicationScoped; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug7721Entity.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug7721Entity.java similarity index 95% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug7721Entity.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug7721Entity.java index 6f3bd9a4afb48..cb5a623681104 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug7721Entity.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug7721Entity.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import java.util.Objects; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug7721EntitySuperClass.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug7721EntitySuperClass.java similarity index 92% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug7721EntitySuperClass.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug7721EntitySuperClass.java index cdfdab400efbd..256c60c9993e9 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug7721EntitySuperClass.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug7721EntitySuperClass.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import java.util.Objects; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug7721OtherEntity.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug7721OtherEntity.java similarity index 86% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug7721OtherEntity.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug7721OtherEntity.java index a63df847ce753..3ed58753ffad6 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Bug7721OtherEntity.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Bug7721OtherEntity.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Cat.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Cat.java similarity index 92% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Cat.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Cat.java index 23cad520333a7..2c12a37ca8bba 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Cat.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Cat.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; import jakarta.persistence.ManyToOne; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/CatDto.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/CatDto.java similarity index 90% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/CatDto.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/CatDto.java index 420bf9922f3d3..55e33c2b09382 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/CatDto.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/CatDto.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import io.quarkus.hibernate.orm.panache.common.ProjectedFieldName; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/CatOwner.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/CatOwner.java similarity index 86% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/CatOwner.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/CatOwner.java index 1b2c50222b6b8..b3e1e33d09f3f 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/CatOwner.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/CatOwner.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/CatProjectionBean.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/CatProjectionBean.java similarity index 94% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/CatProjectionBean.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/CatProjectionBean.java index e02da61409fbe..e9881ddce0edd 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/CatProjectionBean.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/CatProjectionBean.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Dog.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Dog.java similarity index 93% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Dog.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Dog.java index f517180e048fd..d91e3eb54035c 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Dog.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Dog.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DogDao.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DogDao.java similarity index 84% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DogDao.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DogDao.java index 073a6e9832d4c..d82983e6c5cb9 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DogDao.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DogDao.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.enterprise.context.ApplicationScoped; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DogDto.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DogDto.java similarity index 90% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DogDto.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DogDto.java index fb6e1d6809654..1cbd44dece00c 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DogDto.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DogDto.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import io.quarkus.hibernate.orm.panache.common.ProjectedFieldName; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DogDto2.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DogDto2.java similarity index 92% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DogDto2.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DogDto2.java index 22d772fd165d4..45f7c9c4806ee 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DogDto2.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DogDto2.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import io.quarkus.hibernate.orm.panache.common.NestedProjectedClass; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DuplicateEntity.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DuplicateEntity.java similarity index 94% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DuplicateEntity.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DuplicateEntity.java index 86383e2e56464..27e54c7796492 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DuplicateEntity.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DuplicateEntity.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DuplicateRepository.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DuplicateRepository.java similarity index 91% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DuplicateRepository.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DuplicateRepository.java index fa780446eadd3..4f6e64df4dbe4 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/DuplicateRepository.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/DuplicateRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.enterprise.context.ApplicationScoped; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Fruit.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Fruit.java similarity index 89% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Fruit.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Fruit.java index b64435f858be2..99f75b24e2235 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Fruit.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Fruit.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/GenericEntity.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/GenericEntity.java similarity index 88% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/GenericEntity.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/GenericEntity.java index 66d1840e05d58..e4de8366b921a 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/GenericEntity.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/GenericEntity.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.MappedSuperclass; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/JAXBEntity.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/JAXBEntity.java similarity index 95% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/JAXBEntity.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/JAXBEntity.java index 88f79e4c2c1de..ea821efcf9c9e 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/JAXBEntity.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/JAXBEntity.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; import jakarta.xml.bind.annotation.XmlAccessType; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/MockablePersonRepository.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/MockablePersonRepository.java similarity index 88% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/MockablePersonRepository.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/MockablePersonRepository.java index 1b1e55e6544b6..27969a528acc1 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/MockablePersonRepository.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/MockablePersonRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import java.util.List; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryEntity.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryEntity.java similarity index 86% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryEntity.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryEntity.java index 05121d2421d06..ea9ba305956f2 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryEntity.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryEntity.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; import jakarta.persistence.NamedQuery; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryMappedSuperClass.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryMappedSuperClass.java similarity index 89% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryMappedSuperClass.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryMappedSuperClass.java index 356118d6a38ad..e208d127c705a 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryMappedSuperClass.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryMappedSuperClass.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.MappedSuperclass; import jakarta.persistence.NamedQuery; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryRepository.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryRepository.java similarity index 84% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryRepository.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryRepository.java index f9f8d47b20d8b..729ebf84e5008 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryRepository.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.enterprise.context.ApplicationScoped; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryWith2QueriesEntity.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryWith2QueriesEntity.java similarity index 91% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryWith2QueriesEntity.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryWith2QueriesEntity.java index 3d68bbd247dd2..8f66776e6d14d 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryWith2QueriesEntity.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryWith2QueriesEntity.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; import jakarta.persistence.NamedQuery; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryWith2QueriesRepository.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryWith2QueriesRepository.java similarity index 85% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryWith2QueriesRepository.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryWith2QueriesRepository.java index 6f81290b2c487..5fee4c03ec35b 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NamedQueryWith2QueriesRepository.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NamedQueryWith2QueriesRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.enterprise.context.ApplicationScoped; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NoPagingTestEndpoint.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NoPagingTestEndpoint.java similarity index 90% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NoPagingTestEndpoint.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NoPagingTestEndpoint.java index d1f6c2af5c03e..8a2cbf5d1c147 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/NoPagingTestEndpoint.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/NoPagingTestEndpoint.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.transaction.Transactional; import jakarta.ws.rs.GET; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/ObjectWithCompositeId.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/ObjectWithCompositeId.java similarity index 96% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/ObjectWithCompositeId.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/ObjectWithCompositeId.java index 9c56fb443a5a0..57ebe0c8c4d55 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/ObjectWithCompositeId.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/ObjectWithCompositeId.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import java.io.Serializable; import java.util.Objects; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/ObjectWithEmbeddableId.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/ObjectWithEmbeddableId.java similarity index 96% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/ObjectWithEmbeddableId.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/ObjectWithEmbeddableId.java index b566107a13838..829087121eb91 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/ObjectWithEmbeddableId.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/ObjectWithEmbeddableId.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import java.io.Serializable; import java.util.Objects; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PageItem.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PageItem.java similarity index 78% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PageItem.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PageItem.java index d252519c32f77..8bebac2a9b45a 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PageItem.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PageItem.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Entity; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Person.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Person.java similarity index 99% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Person.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Person.java index 2298a87e18dbd..155a685f2b7e8 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Person.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Person.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import java.util.ArrayList; import java.util.List; 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/defaultpu/PersonDTO.java similarity index 97% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonDTO.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonDTO.java index 58f5c874c63c7..f04894742a34b 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/defaultpu/PersonDTO.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import io.quarkus.hibernate.orm.panache.common.NestedProjectedClass; import io.quarkus.hibernate.orm.panache.common.ProjectedFieldName; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonDescription.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonDescription.java similarity index 77% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonDescription.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonDescription.java index 1680db956dfba..02d8ea00af508 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonDescription.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonDescription.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Embeddable; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonDescriptionEmbedded.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonDescriptionEmbedded.java similarity index 76% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonDescriptionEmbedded.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonDescriptionEmbedded.java index 2686088f05adf..215d7003cac07 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonDescriptionEmbedded.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonDescriptionEmbedded.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Embeddable; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonName.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonName.java similarity index 88% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonName.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonName.java index dd81cce776232..9d0c371efaf77 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonName.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonName.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import io.quarkus.runtime.annotations.RegisterForReflection; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonRepository.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonRepository.java similarity index 88% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonRepository.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonRepository.java index 8079899d72e23..82c11acd537d5 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/PersonRepository.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/PersonRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import java.util.List; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Status.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Status.java similarity index 54% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Status.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Status.java index a7ec2e06037a2..cf909fb2e0302 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/Status.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/Status.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; public enum Status { LIVING, diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/TestEndpoint.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/TestEndpoint.java similarity index 99% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/TestEndpoint.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/TestEndpoint.java index 33b34fc47bcb8..07b56adcd7898 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/TestEndpoint.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/TestEndpoint.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -1266,7 +1266,7 @@ public String testProjection() { Assertions.assertEquals("2", person.name); person = Person.find(String.format( - "select uniqueName, name%sfrom io.quarkus.it.panache.Person%swhere name = ?1", + "select uniqueName, name%sfrom io.quarkus.it.panache.defaultpu.Person%swhere name = ?1", LINE_SEPARATOR, LINE_SEPARATOR), "2") .project(PersonName.class) .firstResult(); @@ -1374,8 +1374,8 @@ public String testNestedProjection() { person.persist(); PersonDTO personDTO = Person.find( "select uniqueName, name, " + - " new io.quarkus.it.panache.PersonDTO$AddressDTO(address.street)," + - " new io.quarkus.it.panache.PersonDTO$DescriptionDTO(description.size, description.weight)," + + " new io.quarkus.it.panache.defaultpu.PersonDTO$AddressDTO(address.street)," + + " new io.quarkus.it.panache.defaultpu.PersonDTO$DescriptionDTO(description.size, description.weight)," + " description.size" + " from Person2 where name = ?1", "2n") diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/User.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/User.java similarity index 93% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/User.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/User.java index c6013403f609d..97e7c26181005 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/User.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/User.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/UserRepository.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/UserRepository.java similarity index 90% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/UserRepository.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/UserRepository.java index efc29128dc198..c067d5e69cf1f 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/UserRepository.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/UserRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import java.util.Optional; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/fk/issue35812/SomeEntity.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/fk/issue35812/SomeEntity.java similarity index 76% rename from integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/fk/issue35812/SomeEntity.java rename to integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/fk/issue35812/SomeEntity.java index 5fbc4852341cc..065f1ec4124f3 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/fk/issue35812/SomeEntity.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/defaultpu/fk/issue35812/SomeEntity.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache.fk.issue35812; +package io.quarkus.it.panache.defaultpu.fk.issue35812; import jakarta.persistence.Entity; diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/BookResource.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/BookResource.java index 9852323a15e5c..a0231b70310a6 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/BookResource.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/BookResource.java @@ -8,8 +8,8 @@ import jakarta.ws.rs.Path; import jakarta.ws.rs.PathParam; -import io.quarkus.it.panache.Book; -import io.quarkus.it.panache.BookDao; +import io.quarkus.it.panache.defaultpu.Book; +import io.quarkus.it.panache.defaultpu.BookDao; @Path("/book") public class BookResource { diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/UserResource.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/UserResource.java index 0f307f61004cd..7d353a90ae785 100644 --- a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/UserResource.java +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/UserResource.java @@ -10,7 +10,7 @@ import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response; -import io.quarkus.it.panache.UserRepository; +import io.quarkus.it.panache.defaultpu.UserRepository; @Path("/users") @Produces(MediaType.APPLICATION_JSON) diff --git a/integration-tests/hibernate-orm-panache/src/main/resources/application.properties b/integration-tests/hibernate-orm-panache/src/main/resources/application.properties index b3f68572c8c5c..a4f7671b502a3 100644 --- a/integration-tests/hibernate-orm-panache/src/main/resources/application.properties +++ b/integration-tests/hibernate-orm-panache/src/main/resources/application.properties @@ -2,6 +2,7 @@ quarkus.datasource.db-kind=h2 quarkus.datasource.jdbc.url=jdbc:h2:tcp://localhost/mem:test quarkus.datasource.jdbc.max-size=8 +quarkus.hibernate-orm.packages=io.quarkus.it.panache.defaultpu quarkus.hibernate-orm.database.generation=drop-and-create quarkus.hibernate-orm.statistics=true diff --git a/integration-tests/hibernate-orm-panache/src/test/java/DefaultPackageWithFastJarPMT.java b/integration-tests/hibernate-orm-panache/src/test/java/DefaultPackageWithFastJarPMT.java index d289e5a55c559..805dcccc454e1 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/DefaultPackageWithFastJarPMT.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/DefaultPackageWithFastJarPMT.java @@ -4,7 +4,7 @@ import org.junit.jupiter.api.extension.RegisterExtension; import io.quarkus.builder.Version; -import io.quarkus.it.panache.TestResources; +import io.quarkus.it.panache.defaultpu.TestResources; import io.quarkus.test.ProdBuildResults; import io.quarkus.test.ProdModeTestResults; import io.quarkus.test.QuarkusProdModeTest; diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/DDLGenerationPMT.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/DDLGenerationPMT.java similarity index 97% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/DDLGenerationPMT.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/DDLGenerationPMT.java index 9ac4997a4cf39..86bbeef1b4dda 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/DDLGenerationPMT.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/DDLGenerationPMT.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.is; diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/DuplicateMethodTest.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/DuplicateMethodTest.java similarity index 95% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/DuplicateMethodTest.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/DuplicateMethodTest.java index f6bb30397318d..bbe5ac21690dd 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/DuplicateMethodTest.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/DuplicateMethodTest.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatCode; diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/JacksonTest.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/JacksonTest.java similarity index 71% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/JacksonTest.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/JacksonTest.java index 81e59b415072c..ddbd313189710 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/JacksonTest.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/JacksonTest.java @@ -1,9 +1,10 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import static org.assertj.core.api.Assertions.assertThat; import java.util.List; +import org.assertj.core.api.Assertions; import org.junit.jupiter.api.Test; import io.quarkus.test.junit.QuarkusTest; @@ -17,6 +18,6 @@ public void testJsonIgnoreHonoured() { List books = RestAssured.when().get("/book/Berlin/Beevor").then().extract().body().jsonPath().getList(".", Book.class); - assertThat(books).hasSize(1).filteredOn(book -> book.author != null).isEmpty(); + Assertions.assertThat(books).hasSize(1).filteredOn(book -> book.author != null).isEmpty(); } } diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/MockPersonRepository.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/MockPersonRepository.java similarity index 91% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/MockPersonRepository.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/MockPersonRepository.java index 8fafb7585a474..06bb0d24f4c90 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/MockPersonRepository.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/MockPersonRepository.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.annotation.Priority; import jakarta.enterprise.context.ApplicationScoped; diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/NoPagingPMT.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/NoPagingPMT.java similarity index 98% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/NoPagingPMT.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/NoPagingPMT.java index c02d570568b44..bb03b3aec56f3 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/NoPagingPMT.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/NoPagingPMT.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import static org.assertj.core.api.Assertions.assertThat; import static org.awaitility.Awaitility.await; diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheFunctionalityInGraalITCase.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/PanacheFunctionalityInGraalITCase.java similarity index 84% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheFunctionalityInGraalITCase.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/PanacheFunctionalityInGraalITCase.java index cf1335df76c6b..dbf966054d082 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheFunctionalityInGraalITCase.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/PanacheFunctionalityInGraalITCase.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import io.quarkus.test.junit.QuarkusIntegrationTest; 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/defaultpu/PanacheFunctionalityTest.java similarity index 97% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheFunctionalityTest.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/PanacheFunctionalityTest.java index 5d7883e050d60..2359770bb2751 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/defaultpu/PanacheFunctionalityTest.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.is; @@ -13,7 +13,6 @@ import jakarta.xml.bind.JAXBException; import jakarta.xml.bind.Marshaller; -import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import com.fasterxml.jackson.core.JsonProcessingException; @@ -67,7 +66,7 @@ public void testPanacheSerialisation() { @DisabledOnIntegrationTest @Test public void testPanacheInTest() { - Assertions.assertEquals(0, Person.count()); + assertEquals(0, Person.count()); } @Test @@ -215,10 +214,10 @@ void testBug7102InOneTransaction() { public void testBug7102() { Person person = createBug7102(); Person person1 = getBug7102(person.id); - Assertions.assertEquals("pero", person1.name); + assertEquals("pero", person1.name); updateBug7102(person.id); Person person2 = getBug7102(person.id); - Assertions.assertEquals("jozo", person2.name); + assertEquals("jozo", person2.name); } @Transactional diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheMockingTest.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/PanacheMockingTest.java similarity index 99% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheMockingTest.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/PanacheMockingTest.java index 11ad14eee636a..13d34e7f3aa36 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheMockingTest.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/PanacheMockingTest.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import java.util.Collections; import java.util.Optional; diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheRepositoryBaseTest.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/PanacheRepositoryBaseTest.java similarity index 87% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheRepositoryBaseTest.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/PanacheRepositoryBaseTest.java index adecfaa956055..23676109d2617 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/PanacheRepositoryBaseTest.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/PanacheRepositoryBaseTest.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import org.junit.jupiter.api.Test; diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestResources.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TestResources.java similarity index 84% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestResources.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TestResources.java index ba184daba024c..0634b8da653a1 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestResources.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TestResources.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import io.quarkus.test.common.WithTestResource; import io.quarkus.test.h2.H2DatabaseTestResource; diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestTransactionOnSingleMethodTest.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TestTransactionOnSingleMethodTest.java similarity index 96% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestTransactionOnSingleMethodTest.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TestTransactionOnSingleMethodTest.java index 03a6bcc9c5ad7..ea5b750a8b330 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestTransactionOnSingleMethodTest.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TestTransactionOnSingleMethodTest.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.transaction.Transactional; diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestTransactionTest.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TestTransactionTest.java similarity index 92% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestTransactionTest.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TestTransactionTest.java index d3f93c057512c..a70b5b196a535 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TestTransactionTest.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TestTransactionTest.java @@ -1,11 +1,11 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.MethodOrderer.MethodName; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; -import io.quarkus.it.panache.fk.issue35812.SomeEntity; +import io.quarkus.it.panache.defaultpu.fk.issue35812.SomeEntity; import io.quarkus.test.TestTransaction; import io.quarkus.test.junit.QuarkusTest; diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TransactionalPanacheEntityTest.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TransactionalPanacheEntityTest.java similarity index 92% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TransactionalPanacheEntityTest.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TransactionalPanacheEntityTest.java index 8ca1ac7d0cf9b..bb7858e73edd5 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TransactionalPanacheEntityTest.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TransactionalPanacheEntityTest.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TransactionalRepositoryTest.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TransactionalRepositoryTest.java similarity index 93% rename from integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TransactionalRepositoryTest.java rename to integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TransactionalRepositoryTest.java index f72061a3a3a67..64865250a6679 100644 --- a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/TransactionalRepositoryTest.java +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/defaultpu/TransactionalRepositoryTest.java @@ -1,4 +1,4 @@ -package io.quarkus.it.panache; +package io.quarkus.it.panache.defaultpu; import jakarta.inject.Inject; From e3de691b7f4e9bbe2ca3100807c0d0f90a11efa3 Mon Sep 17 00:00:00 2001 From: marko-bekhta Date: Thu, 8 Aug 2024 13:56:11 +0200 Subject: [PATCH 3/3] Add a test for non default pu --- .../it/panache/custompu/CustomPuEntity.java | 10 ++++++ .../panache/resources/CustomPuResource.java | 33 +++++++++++++++++++ .../src/main/resources/application.properties | 9 +++++ .../it/panache/custompu/SmokeTest.java | 18 ++++++++++ 4 files changed, 70 insertions(+) create mode 100644 integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/custompu/CustomPuEntity.java create mode 100644 integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/CustomPuResource.java create mode 100644 integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/custompu/SmokeTest.java diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/custompu/CustomPuEntity.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/custompu/CustomPuEntity.java new file mode 100644 index 0000000000000..edb22ff1614de --- /dev/null +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/custompu/CustomPuEntity.java @@ -0,0 +1,10 @@ +package io.quarkus.it.panache.custompu; + +import jakarta.persistence.Entity; + +import io.quarkus.hibernate.orm.panache.PanacheEntity; + +@Entity +public class CustomPuEntity extends PanacheEntity { + public String string; +} diff --git a/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/CustomPuResource.java b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/CustomPuResource.java new file mode 100644 index 0000000000000..d4e8c61fafe68 --- /dev/null +++ b/integration-tests/hibernate-orm-panache/src/main/java/io/quarkus/it/panache/resources/CustomPuResource.java @@ -0,0 +1,33 @@ +package io.quarkus.it.panache.resources; + +import java.util.List; + +import jakarta.transaction.Transactional; +import jakarta.ws.rs.PATCH; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; + +import io.quarkus.it.panache.custompu.CustomPuEntity; + +@Path("/custom-pu") +public class CustomPuResource { + + @Transactional + @POST + @Path("/{string}") + public CustomPuEntity create(@PathParam("string") String string) { + CustomPuEntity entity = new CustomPuEntity(); + entity.string = string; + entity.persist(); + return entity; + } + + @Transactional + @PATCH + @Path("/{string}") + public List updateAll(@PathParam("string") String string) { + CustomPuEntity.update("set string = ?1 where 1 = 1", string); + return CustomPuEntity.findAll().list(); + } +} diff --git a/integration-tests/hibernate-orm-panache/src/main/resources/application.properties b/integration-tests/hibernate-orm-panache/src/main/resources/application.properties index a4f7671b502a3..c3d3b34f727d6 100644 --- a/integration-tests/hibernate-orm-panache/src/main/resources/application.properties +++ b/integration-tests/hibernate-orm-panache/src/main/resources/application.properties @@ -7,3 +7,12 @@ quarkus.hibernate-orm.database.generation=drop-and-create quarkus.hibernate-orm.statistics=true quarkus.hibernate-orm.metrics.enabled=true + +quarkus.datasource."custom".db-kind=h2 +quarkus.datasource."custom".jdbc.url=jdbc:h2:tcp://localhost/mem:test +quarkus.datasource."custom".jdbc.max-size=8 + +quarkus.hibernate-orm."custom".datasource=custom +quarkus.hibernate-orm."custom".packages=io.quarkus.it.panache.custompu +quarkus.hibernate-orm."custom".database.generation=drop-and-create +quarkus.hibernate-orm."custom".database.generation.create-schemas=true diff --git a/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/custompu/SmokeTest.java b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/custompu/SmokeTest.java new file mode 100644 index 0000000000000..bb050e5ab7d38 --- /dev/null +++ b/integration-tests/hibernate-orm-panache/src/test/java/io/quarkus/it/panache/custompu/SmokeTest.java @@ -0,0 +1,18 @@ +package io.quarkus.it.panache.custompu; + +import static org.hamcrest.Matchers.containsString; + +import org.junit.jupiter.api.Test; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.RestAssured; + +@QuarkusTest +class SmokeTest { + + @Test + void testPanacheFunctionality() throws Exception { + RestAssured.when().post("/custom-pu/someValue").then().body(containsString("someValue")); + RestAssured.when().patch("/custom-pu/someUpdatedValue").then().body(containsString("someUpdatedValue")); + } +}