设置一下 cascade属性为: cascade="all" 试试看;
<set name="defectCategories" inverse="true" cascade="all">
<set name="defectCategories" inverse="true" cascade="all">
解决方案 »
- 与struts1相比struts2不足之处
- 关于JSP页面显示图片的问题
- Spring + hibernate +webwork 执行action 方法时运行了两遍
- webservice 调用的问题
- 在eclipse上写的html 和JSP的中文字符输出时全是乱码怎么办
- Tomcat问题!
- JSP页面生成XML的问题,问题解决后马上给分!!!
- 怎么用Jbuilder9装入一个已经存在的Struts源程序
- 转向J2EE代价高吗?
- spring+mybatis工程打成jar包被第三方调用时报 No unique bean of type is defined: expected singl
- hebernate的annotation问题:共享主键的@ONETOONE
- 成功lookup后,ClassCastException
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping><class
name="cattsoft.uci.ejb.po.DefectCategory"
table="DEFECT_CATEGORY"
lazy="false"
> <id
name="dcid"
type="java.lang.Integer"
column="DCID"
>
<generator class="assigned" />
</id> <property
name="name"
type="java.lang.String"
column="NAME"
not-null="true"
length="64"
/> <!-- associations -->
<!-- bi-directional one-to-many association to DefectCategory -->
<set
name="defectCategories"
lazy="false"
inverse="true"
>
<key>
<column name="PARENT_DCID" />
</key>
<one-to-many
class="cattsoft.uci.ejb.po.DefectCategory"
/>
</set>
<!-- bi-directional many-to-one association to DefectCategory -->
<many-to-one
name="defectCategory"
class="cattsoft.uci.ejb.po.DefectCategory"
not-null="true"
fetch="join"
>
<column name="PARENT_DCID" />
</many-to-one>
<!-- bi-directional one-to-many association to Qualitydefect -->
<set
name="qualitydefects"
lazy="true"
inverse="true"
>
<key>
<column name="DCID" />
</key>
<one-to-many
class="cattsoft.uci.ejb.po.Qualitydefect"
/>
</set></class>
</hibernate-mapping>