hibernate自动删除以前的表

lg_asus lg_asus 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区

<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="foo">
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@127.0.0.1:1521:test</property>
<property name="hibernate.connection.username">test</property>
<property name="hibernate.connection.password">test</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hiernate.hbm2ddl.auto">validate</property>
<property name="hibernate.show_sql">true</property>
<mapping resource="com/asm/hibernate/domain/Student.hbm.xml"/>
<mapping resource="com/asm/hibernate/domain/Teacher.hbm.xml"/>
</session-factory>
</hibernate-configuration>

这是我的hibernate.cfg.xml文件,不管我把hbm2ddl.auto配置成什么值,结果都会把以前建的表删除掉。我的java代表中并没有创建表的语句,请问这是为什么啊????
小弟刚学hibernate,请大侠们帮帮忙,只用到hibernate,没有struts spring.
...全文

相关推荐

评论 5
收藏 已收藏
分享
返回顶部
lg_asus
Java EE 67,535 成员 225,843 内容