I am new to Hibernate/JPA and I am stuck at what I think is the last step. I have created a schema in my MySQL instance and want to generate the tables for the schema from the JPA entities I have created. I get an option in JPA Tools in eclipse "Generate Tables from Entities" but that gives me a message "Generate Tables from Entities is not supported by the Generic Platform. Is there a plugin or tool I need to use to make this work ?
Asked
Active
Viewed 1.6k times
2 Answers
18
You will need to first install Hibernate Tools - How to install Hibernate Tools in Eclipse?
Then go to Project->Preferences->JPA and change the Platform to the appropriate version of Hibernate instead of the Generic Platform.

Community
- 1
- 1

Karen Butzke
- 1,442
- 12
- 18
4
If you are using hibernate you can:
- set "hibernate.hbm2ddl.auto" in your project to one of following values "update | create | create-drop" (read more at: http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/session-configuration.html). Schema will be created/updated when you run your application.
- you can try Hibernate 3 Maven plugin, check hbm2ddl goal ( http://mojo.codehaus.org/maven-hibernate3/hibernate3-maven-plugin/)

Potejciak
- 238
- 1
- 8
-
I installed Hibernate Tools and tried using it on my Eclipse project. It seems that Eclipse 4.2 is not compatible with the tool and it crashed my project. I am wondering if I would need to try it with an older version of Eclipse. It seems that this solution answers my question though. Thank you. – Vineet Oct 20 '12 at 03:16