设置一下 cascade属性为: cascade="all" 试试看;
<set name="defectCategories" inverse="true" cascade="all">
<set name="defectCategories" inverse="true" cascade="all">
解决方案 »
- strut2如何不用java语句在jsp页面接收显示后台传来的表格
- 求助:Spring中,想在一个工程的XML文件引用另一个工程的property文件
- jsp如何获得该文件的绝对路径?
- struts2里generator标签提取分割后的子串,然后将子串赋予一个变量,应当怎么写啊
- Spring+Hibernate中,在applicationContext中配置proxool,导致数据只读。
- Spring + Velocity的应用中,在模版为什么访问不到session的对象?
- static的问题
- strtus問題
- JAJA程序有类似exe+dll的机制么?
- 大家在小型项目中是否有什么工具可以分析日志
- 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>