问题出在hibernate的映射文件上,hibernate3.0产生的映射文件字段类型都是基本类型例如
<property name="createDt" type="date">
<column name="CREATE_DT" length="7" />
</property>
type类型不对,正确格式应该如下:
<property name="createDt" type="java.util.Date">
<column name="CREATE_DT" length="7" />
</property>
问题解决数据库显示时分秒年月日,好像hibernate3.2不存在这个问题,3.2的映射文件已经做了修改,是第二种格式!所以使用3.0时要注意
<property name="createDt" type="date">
<column name="CREATE_DT" length="7" />
</property>
type类型不对,正确格式应该如下:
<property name="createDt" type="java.util.Date">
<column name="CREATE_DT" length="7" />
</property>
问题解决数据库显示时分秒年月日,好像hibernate3.2不存在这个问题,3.2的映射文件已经做了修改,是第二种格式!所以使用3.0时要注意