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

hibernate 异常集

2012-08-21 
hibernate错误集一:一对多时出现 save the transient instance before flushing在一的一方加cascadeall

hibernate 错误集
一:一对多时出现 save the transient instance before flushing
在一的一方加cascade="all"属性


二:Repeated column in mapping for entity 异常原因
http://blog.163.com/mianye349896094@126/blog/static/109528377201041932659677/
1、数据库的字段值和javaBean中的属性类型不统一。对于基本类型,要用wrapper类型而不是primitive类型。2、 hibernate的配置文件xxx.hbm.xml中的属性配置不为空,而数据库中的字段却为空。3.两个字段对应同一列,如:password 和repassword同时对应数据库表中的password一列,同时update和insert都设为true。

热点排行