question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hibernate hbm2ddl in application.properties is not working as mentioned

See original GitHub issue

Describe the bug Hibernate hbm2ddl in application.properties is not working as mentioned

Expected behavior

# drop and create the database at startup (use `update` to only update the schema)
quarkus.hibernate-orm.database.generation=drop-and-create

This is mentioned in the documentation. It should work with update.

Actual behavior “update” not working. It would still create the tables.

To Reproduce Steps to reproduce the behavior:

  1. https://github.com/SetoKaiba/code-with-quarkus
  2. MySQL 8.0.16
  3. Windows OS. Chinese.

Configuration

# Add your application.properties here, if applicable.

Screenshots (If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

  • Output of uname -a or ver:
  • Output of java -version:
  • GraalVM version (if different from Java):
  • Quarkus version or git rev:

Additional context (Add any other context about the problem here.)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
dreab8commented, Dec 17, 2019
0reactions
Sannecommented, Jun 22, 2021

This is fixed in https://github.com/hibernate/hibernate-orm/pull/3151 , but we’ll close the Quarkus issue when we upgrade the ORM component to include the fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table is not being created, despite `hibernate.hbm2ddl.auto ...
For some reason, my db tables are not being created according to the entity model in the codebase. I am looking for the...
Read more >
Using Hibernate ORM and JPA - Quarkus
When no property is set, Quarkus can typically infer everything it needs to set up Hibernate ORM and will have it use the...
Read more >
Common Application Properties - Spring
Name Description Default... spring.cassandra.config Location of the configuration file to use. spring.cassandra.controlconnection.timeout Timeout to use for control queries. 5s spring.cassandra.keyspace‑name Keyspace name to use.
Read more >
Spring Boot Application Properties - Vlad Mihalcea
Spring Boot Application Properties – Hibernate Configuration ... The spring.jpa.hibernate.ddl-auto setting is set to none to disable the hbm2ddl ...
Read more >
A Custom Auto-Configuration with Spring Boot - Baeldung
An application that uses the MySQLAutoconfiguration may need to override the default properties. In this case, it just needs to add different ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found