quarkus: Hibernate ORM: Schema is not generated

Hey, we are playing around with quarkus. First: Thank you for your work, I like it very much.

Here is my bug: Describe the bug I noticed, that, when using a schema in an entity, hibernate orm does not create the schema which is used in @Table Annotation, even if you use create/drop-and-create as strategy. following error are, that tables cannot be created, because there is no such given schema.

Expected behavior Schema should be created before creating the tables.

Actual behavior Schema is not created. Error: Caused by: org.postgresql.util.PSQLException: ERROR: schema “myschema” does not exist when hibernate tries to create a table.

To Reproduce Steps to reproduce the behavior:

  1. clone the https://github.com/quarkusio/quarkus-quickstarts/tree/master/hibernate-orm-quickstart
  2. go the Fruit Entity and schema to @Table
  3. add the schema to the import.sql
  4. Run the *Test class

Environment (please complete the following information):

  • Quarkus version or git rev: 1.7.1, also tried for 1.6.1
  • Build tool (ie. output of mvnw --version or gradlew --version): maven

Thanks, guys!

Bastian

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 24 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Works with quarkus.hibernate-orm.database.generation.create-schemas=true!!! Thank you for the superfast feedback and implementation.

@BastianSperrhacke-Otto in the end, I reproduced the issue and created the following PR: https://github.com/quarkusio/quarkus/pull/11901