Hi, I am using hibernate with struts, whenever I start the web server it will cteate the sessionfactory object, and also It is doing the DDL operations like creating the tables & alter the tables without removing the existing datas in the table. My cfg file is ..
<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration> <session-factory> <property name="hibernate.bytecode.use_reflection_optimizer">false</property> <property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property> <property name="hibernate.connection.url">jdbc:oracle:thin:@192.168.1.12:1521:orcl</property> <property name="hibernate.connection.username">ezytemplate</property> <property name="hibernate.connection.password">template</property> <property name="hibernate.connection.pool_size">100</property> <property name="show_sql">true</property> <property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property> <property name="hibernate.hbm2ddl.auto">update</property> <property name="current_session_context_class">thread</property> <mapping resource="/hibernate/login.hbm.xml"/> <mapping resource="/hibernate/jspproperties.hbm.xml"/> <mapping resource="/hibernate/validation.hbm.xml"/> <mapping resource="/hibernate/jsppagedefn.hbm.xml"/> </session-factory> </hibernate-configuration>
But my expected output is , I dont want the hibernate creating the tables & updating the tables whenever the sessionFactory object is created ....
can I have the complete information about the cfg file properties Especially the below property
<property name="hibernate.hbm2ddl.auto">update</property>
|