Hello guys
i see that each time that i startup my tomcat,Code:<property name="hibernateProperties"> <props> <!-- SQL dialect --> <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</prop> <!-- Enable Hibernate's automatic session context management --> <prop key="hibernate.current_session_context_class" >thread</prop> <!-- Disable the second-level cache --> <prop key="hibernate.cache.provider_class" >org.hibernate.cache.NoCacheProvider</prop> <!-- Echo all executed SQL to stdout --> <prop key="hibernate.show_sql" >true</prop> <!-- Drop and re-create the database schema on startup --> <prop key="hibernate.hbm2ddl.auto" >create</prop> </props> </property>
well the db is created each time and all db data is losted
so to avoid this,
to before to shutdown and startup again,
well i comment the bold line and all the db is keep it with the data
but i am lost with this
if i instead of create value i use
update
well
1:what happens if now in my hbm files i create for the old tables more fields?
2: i create new tables
3: for these new tables maybe can now has relations to the old tables
so for the old tables
which behaviour would has this update in the schema?,
specially with the old rows already inserted in the db?
i am lost with this
some advice of answers are really appreciate
thanks in advanced


Reply With Quote
