yamlquarkusquarkus-hibernate-orm

How can I set hibernate-orm.database.generation and create-schemas in application.yaml


I'm new in Quarkus. I am writing config file in yaml, but got stuck because of this config.

In Quarkus doc, I am seeing these config and I need to configure them.

quarkus.hibernate-orm.database.generation=drop-and-create
quarkus.hibernate-orm.database.generation.create-schemas=true

I'm not sure how can I make yaml same ?

quarkus:
  hibernate-orm:
    database:
      generation: drop-and-create # < this one is string and object at the same time...
        create-schemas: true

Solution

  • You can use ~:

    quarkus:
      hibernate-orm:
        database:
          generation:
            ~: drop-and-create
            create-schemas: true
    

    You can find more details in the documentation: Configuration key conflicts