1.should be mapped with insert="false" update="false"
解决方案:
1).两个属性不能对应一行
2).在建立多对一关系映射时,出问题,具体如下:
/**
* @hibernate.many-to-one column="personal_id"
* class="com.cmp.yiwu.psn.self.model.Personaldossier"
* outer-join="auto" cascade="none"
*/
而当前类中也有了personal_id属性,故会报错.应将当前为中属性去掉即可.
2.ERROR - BatchingBatcher.doExecuteBatch(61) | Exception executing batch:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
ERROR - AbstractFlushingEventListener.performExecutions(300) | Could not synchronize database state with session
解决方案:???没有取得主表对象
3.cascade="none" cascade="all" 是否级联更新
set lazy="true" 是否延迟加载.
4.分页不成功_点击下一页无响应. ***************解决
解决方案:*.jsp页面不能将分页自定义标签嵌入到当前页面的form中.
5.one-to-one 的几种形式:
第一种:不指定字段
主类: /**
* @hibernate.one-to-one class = "com.cmp.yiwu.psn.family.model.FamilyHealthCare"
* outer-join = "true" cascade="all"
* @return Returns
*/
子类: /**
* @hibernate.one-to-one class="com.cmp.yiwu.psn.family.model.FamilyInformation"
* constrained="true"
* cascade="none" outer-join="auto"
*/
第二种:在多对一时,指定uinque="true"属性
6.门诊号码的产生,格式化问题? 解决
7.ERROR - StandardWrapperValve.invoke(250) | Servlet.service() for servlet action threw exception
java.lang.ClassCastException:
7.待解决问题:
(1).时间查询between ... and ...? ***************解决
(2).时间与字符串间的转换? ***************解决
(3).整型值0001,格式化问题? ***************解决
8.在普通的类中取得spring配置文件中定义的bean???? 没解决
//
// //static ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext("applicationContext.xml");
// ApplicationContext appContext=new ClassPathXmlApplicationContext("applicationContext.xml");
// //ApplicationContext appContext = new FileSystemXmlApplicationContext("csm/WebRoot/WEB-INF/applicationContext.xml");
// BeanFactory factory = (BeanFactory) appContext;
// //public static Get_GuaHao_Number REPTRBUSINESS =(Get_GuaHao_Number)appContext.getBean("REPTRBUSINESS");
//
9.
ERROR - RequestProcessor.processMapping(664) | Invalid path /csm/ajax/qkzl/jiuzhen/right was requested
2007-10-5 9:19:17 org.apache.tomcat.util.http.Parameters processParameters
警告: Parameters: Invalid chunk ignored.
10.两表连接查询返回集合不得存放于session中转向.
解决方案:
将对象拷贝 ObjectCopyProperty.notNullPropertyCopy(person, gua.getPersonaldossier());
11.数据分页后,超链接不保持???? -----待解决
12.保存数据时:
INFO - NullableType.nullSafeSet(87) | could not bind value '0' to parameter: 3; java.lang.Integer
ERROR - StandardWrapperValve.invoke(250) | Servlet.service() for servlet action threw exception
java.lang.ClassCastException: java.lang.Integer
解决方案:
实体配置中age数据字段类型为int,而数据库配置为long,数据类型不统一,即使不添加测试数据也报加载错误!!!
13.就诊查询与查询分页时,点击下一页无响应或报错...
14.
ERROR - ApplicationDispatcher.invoke(723) | Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: net/sf/hibernate/HibernateException
分页时:action中必须调用分页的方法,否则直接跳转到页面中会无法显示,以导致500的错误.
15.超连接传递javascript变量:
url:
aid.href="<!---->/ajax/zhuanZhen_chu_FindInfoByPersonId.do?personal_id="+url;
aid为....
16.保存数据后再根据ID查询一次数据....
new ActionForward("url.do?id=123");即:
return new ActionForward("/ajax/zhuanZhen_FindRuInfo.do?personal_id="+personal_id);