I have running a project in hibernate and the connection and pojo classes are successfully created for me. Now my problem is when i have running a project each time the hibernate is trying to create the database in the connected host, that's why unwanted indexes in my database each time when i run the project. Anybody know how could i avoid that?
2 Answers
change your hibernate config, from this
<property name="hbm2ddl.auto">create</property>
to this
<property name="hbm2ddl.auto">validate</property>
To stop hibernate creating the database each deploy. Alternate options are also available.
3 Comments
user359187
But i have only <property name="hibernate.hbm2ddl.auto">update</property> this in my hibernate config file
NimChimpsky
then hibernate is not creating a database, it is only altering it
user359187
Then how i got create multiple indexes in my database. Is there any other config to change?