should be mapped with insert="false" update="false"


我 找了好久原来是个低级错误,在copy的时候不小心的缘故

<hibernate-mapping package="com.strive.entity">

  <class name="Dept" table="Dept">
   <id name="deptno" column="deptno"  type="integer">
       <generator class="assigned"></generator>
   </id>
   <property name="dname"  column="deptno" type="string"></property>
   <property name="loc"  column="loc" type="string"></property>
  </class>
</hibernate-mapping>
posted @ 2012-02-19 12:56  spring3  阅读(625)  评论(0编辑  收藏  举报