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?
Asked
Active
Viewed 3,432 times
2 Answers
4
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.

Community
- 1
- 1

NimChimpsky
- 46,453
- 60
- 198
- 311
-
But i have only
update this in my hibernate config file – user359187 Feb 28 '12 at 15:07 -
1then hibernate is not creating a database, it is only altering it – NimChimpsky Feb 28 '12 at 15:08
-
Then how i got create multiple indexes in my database. Is there any other config to change? – user359187 Feb 28 '12 at 15:10
0
change your hibernate config, from this
create to this
update
The DB will create 1 time

reznic
- 672
- 6
- 9