日期:2014-05-16  浏览次数:21035 次

导致org.hibernate.PropertyAccessException:的可能原因

1、类型错误:例:Integer写成int

2、参数名称错误:大小写没有写对

3、1对多集合映射时,pojo中的集合时List对象,配置文件中确是对set集合的配置

?????

写道
/**
* 项目报告集合
*/
List<GdzcProjectReport> projectReports =new ArrayList<GdzcProjectReport>();


<list name="projectReports" table="GDZC_PROJECT_REPORT" cascade="all" inverse="true">
<key column="projectId" ></key>
<!-- report_time 字段用来记录 保存的数据的顺序 根据报告时间-->
<index column="report_time" type="java.util.Date"></index>
<one-to-many class="com.gwideal.jxwpgsh.pojo.GdzcProjectReport" />
</list>

?