FAQs
Search
Recent Topics
Flagged Topics
Hot Topics
Best Topics
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Liutauras Vilda
Bear Bibeault
Junilu Lacar
Martin Vashko
Sheriffs:
Jeanne Boyarsky
Tim Cooke
Knute Snortum
Saloon Keepers:
Ron McLeod
Tim Moores
Stephan van Hulst
Tim Holloway
Carey Brown
Bartenders:
Scott Selikoff
salvin francis
Piet Souris
Forum:
EJB and other Jakarta /Java EE Technologies
hibernate (6) mysql (8) [hibernate can't create the table:
John Brown jr
Greenhorn
Posts: 1
posted 1 week ago
hibername: hi;
Using macos ;
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/> <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
and also :
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/mydb?createDatabaseIfNotExist=true"/>
inside eclipse.
the short of the story is this:
running my project would even create a mydb database if it idoesn'texist and also even drop table (mytable) if it exists but doesn't create it:
ERROR: Table 'mydb.mytable' doesn't exist Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute statement Caused by: java.sql.SQLSyntaxErrorException: Table 'mydb.mytable' doesn't exist
Your buns are mine! But you can have this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
Post Reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
"hibernate.hbm2ddl.auto">create - to generate DB Tables
I can't do my Hibernate just update the table it is dropping it
Standalone JPA example
hibernat creating the tables without cascade
Hibernate Configurations
More...