quarkus
quarkus copied to clipboard
hbm2ddl create-schemas doesn't work
Describe the bug
The option quarkus.hibernate-orm.database.generation.create-schemas seems to doesn't work anymore since 2.6.3.Final. I'm not sure if it's caused by Hibernate upgrade or not.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of uname -a or ver
Darwin local 21.5.0 Darwin Kernel Version 21.5.0: Thu Apr 21 19:51:22 PDT 2022; root:xnu-8020.120.68.131.2~2/RELEASE_X86_64 x86_64
Output of java -version
openjdk version "11.0.15" 2022-04-19
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.3.Final and newer
Build tool (ie. output of mvnw --version or gradlew --version)
Gradle 7.4.2
Additional information
No response
/cc @Sanne, @gsmet
It seems to work in our integration tests:
https://github.com/quarkusio/quarkus/blob/d688bcf1cb178b09a1424c12b5971640da8b1f82/integration-tests/jpa-postgresql/src/main/resources/application.properties#L7
https://github.com/quarkusio/quarkus/blob/7c9966fc7aa5c7ceec6e08cfe51b04128dfe32cf/integration-tests/jpa-postgresql/src/main/java/io/quarkus/it/jpa/postgresql/Person.java#L14
https://github.com/quarkusio/quarkus/blob/7c9966fc7aa5c7ceec6e08cfe51b04128dfe32cf/integration-tests/jpa-postgresql/src/main/java/io/quarkus/it/jpa/postgresql/JPAFunctionalityTestEndpoint.java#L107-L131
Can you please provide a simple project that reproduces the problem?
Thank you.
This other issue suggests the problem is only when quarkus.hibernate-orm.database.generation is set to update. Was that your case?
Bump. @vu-bui Can you give us a reproducer, or at least confirm your problem is the same as this one and occurs only when quarkus.hibernate-orm.database.generation is set to update?
@yrodiere Sorry for the late reply. I've created a repo here https://github.com/vu-bui/quarkus-hibernate-schema-generation.
What I found out was that quarkus.hibernate-orm.database.generation.create-schemas does not work with quarkus.hibernate-orm.database.default-schema. It works with Quarkus 2.6.2.Final and earlier.
It also works if I specifically define @Table(schema = "")
Thanks a lot for the information and reproducer @vu-bui , it does seem related to some changes I'm familiar with. I will have a closer look.
After some investigation, the problem seems to be upstream. I reported the problem: https://hibernate.atlassian.net/browse/HHH-16177 I will try to come up with a fix upstream. Thanks again for the reproducer, that helped a lot.
The bug was fixed upstream. It will be fixed in Quarkus as soon as we upgrade to either Hibernate ORM 5.6.16.Final or Hibernate ORM 6.2.0.Final (neither was released yet).
I presume this was closed with https://github.com/quarkusio/quarkus/pull/32687, I'll write test in QE test suite, so will verify it later.
thanks @michalvavrik !
I presume this was closed with #32687, I'll write test in QE test suite, so will verify it later.
That's right, I forgot to close this. Thanks!