Home >Database >Mysql Tutorial >Why Isn't Hibernate Automatically Creating My Database Tables?
Automatically Creating/Updating Database Tables with Hibernate
Your code example includes a persistence.xml configuration with the property hibernate.hbm2ddl.auto set to create. As the documentation indicates, this should automatically create the tables based on your entity classes.
However, if the table is not being created, confirm that:
If all of these are in order, you may need to investigate further into the underlying database connection, JDBC driver, or any potential exceptions that may be occurring. It is recommended to enable debug logging to see what Hibernate is doing behind the scenes.
The above is the detailed content of Why Isn't Hibernate Automatically Creating My Database Tables?. For more information, please follow other related articles on the PHP Chinese website!