首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

hibernate自动生成表构造

2012-09-11 
hibernate自动生成表结构hibernate Annotation不用SchemaExport也可以生成表呀,只要在sessionFactory配置

hibernate自动生成表结构
hibernate Annotation不用SchemaExport也可以生成表呀,只要在sessionFactory配置的过程中
<property name="hibernateProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>

其中update表示加载hibernate自动更新数据库结构,你也可以用create,但这样你数据库中的所有数据都会被清除,估计你现在写的是none,所以不会自动生成 

热点排行