Java琐事

-I am not alone
posts - 54, comments - 30, trackbacks - 0, articles - 1
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理

4月22日

Posted on 2011-04-22 16:09 石子路口 阅读(1370) 评论(1)  编辑  收藏 所属分类: 记录
1. 在myeclipse的右下角,updating indexes进度条一直不会在进行,闹心。解决:在打开“windows”---“preferences”---“Myeclipse Enterprise Workbench”---“Maven4Myeclipse”后,把“Download repository index updates on startup”前面的勾去掉,apply,ok
2. 关于由hibernate自动生成表结构的配置(在applicationContext.xml中)
    hibernate.hbm2ddl.auto有以下四种配置参数:
    validate:加载hibernate时,验证创建数据库表结构
    create:每次加载hibernate,重新创建数据库表结构,这就是导致数据库表数据丢失的原因
    create-drop:加载hibernate时创建,退出是删除表结构
    update:加载hibernate自动更新数据库结构
所以,在创建表的时候,完全可以考虑自动生成(create)或者不使用外键(update时产生)

评论

# re: 4月22日  回复  更多评论   

2011-04-23 21:19 by 新能源
这个是关于什么的文章

只有注册用户登录后才能发表评论。


网站导航: