wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes hibernate creating table automatically Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply locked New topic
Author

hibernate creating table automatically

Kavitha hebbar
Greenhorn

Joined: Sep 12, 2012
Posts: 9
I want to create tables automatically through hibernate.for that I've written <property name="hbm2ddl.auto">create</property> in configuration.xml.When I run it will ask "select Java application" giving many options like SchemaUpdate,Dialect..etc.If I select i get many exceptions.What is mistake in my program?
Please help.
Thanks.
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1646
    
    7

It sounds like you are running it from eclipse and you have multiple classes with main methods and it is asking you to select one. Perhaps show us a little more code. I can't see why just adding this property would cause this.


[How To Ask Questions][Read before you PM me]
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1646
    
    7

seems this topic is the same as the one here:

http://www.coderanch.com/t/592792/ORM/databases/hibernate-table-creation

closing this one.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hibernate creating table automatically
 
Similar Threads
Foreig key must have same number of columns as the referenced primary key
In eclipse how to create a folder with a package and package within a package?
pre-selecting values in a select list
many side of one to many not being populated
Struts more html:select