问题描述
<li>ORA-00932:???????:??NUMBER,????BINARY</li><li>couldnotloadanentity:[com.transino.zbxx.dto.TaskRptInstInfo]</li><li>couldnotloadanentity:[com.transino.zbxx.dto.TaskRptInstInfo];SQL[selecttaskrptins0_.taskRptInstInfoCodeastaskRptI1_61_0_,taskrptins0_.MANAGERasMANAGER61_0_,taskrptins0_.AUDITORasAUDITOR61_0_,taskrptins0_.SUBMITERasSUBMITER61_0_fromTEST.REPORT_TASKRPTINSTINFOtaskrptins0_wheretaskrptins0_.taskRptInstInfoCode=?];nestedexceptionisorg.hibernate.exception.SQLGrammarException:couldnotloadanentity:[com.transino.zbxx.dto.TaskRptInstInfo</li>上述问题相关联代码:1.一对一主键关联的映射文件:<?xmlversion="1.0"encoding="utf-8"?><!DOCTYPEhibernate-mappingPUBLIC"-//Hibernate/HibernateMappingDTD3.0//EN""http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"><hibernate-mapping><classname="com.transino.zbxx.dto.TaskRptInstInfo"table="REPORT_TASKRPTINSTINFO"schema="TEST"><idname="taskRptInst"column="taskRptInstInfoCode"><generatorclass="foreign"><paramname="property">REPORT_TASKRPTINST</param></generator></id><propertyname="manager"type="java.lang.String"><columnname="MANAGER"length="20"/></property><propertyname="auditor"type="java.lang.String"><columnname="AUDITOR"length="20"/></property><propertyname="submiter"type="java.lang.String"><columnname="SUBMITER"length="20"/></property><one-to-onename="taskRptInst"constrained="true"></one-to-one></class></hibernate-mapping>2.映射实体类部分代码:publicclassTaskRptInstInfoimplementsjava.io.Serializable{privateTaskRptInsttaskRptInst;//提供标识功能(一对一映射)privateStringmanager;//主管人privateStringauditor;//复核人privateStringsubmiter;//制表人}3.HibernateTemplate主键查询方法:this.getHibernateTemplate().get(type,(Serializable)(newTaskRptInst("A380")));我想的可能出错点:1.一对一映射文件:感觉有问题,特别是主键映射那一块儿希望各位多多指点!最好给一些深入点的,针对性广的能解决一般性类似问题的理解!渴望而又焦急的等待中.....