-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Regarding details about the hibernate cfg file
PostPosted: Wed Jun 10, 2009 10:05 am 
Newbie

Joined: Wed Jun 10, 2009 7:38 am
Posts: 1
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>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.