hibernate中的对多对关系中间表删除不了,设置了主从关系后还是删不了,提示违反完整约束条件

customer映射文件:
<hibernate-mapping>
<class name="com.ds.customer.model.Customer" table="USER_TABLE">
<id name="id" type="java.lang.Long">
<column name="USER_ID" ></column>
<generator class="sequence">
<param name="sequence">USER_SEQ</param>
</generator>
</id>
<property name="username" type="java.lang.String">
<column name="username"></column>
</property>
<property name="password" type="java.lang.String">
<column name="password"></column>
</property>
<property name="role" type="java.lang.String">
<column name="ROLE_ID"></column>
</property>
<property name="email" type="java.lang.String">
<column name="EMAIL"></column>
</property>
<set name="bacteriumClassifyes" table="ADMIN_BACTERIUM_CLASS_TABLE" inverse="false">
<key column="USER_ID"></key>
<many-to-many class="com.ds.classify.model.BacteriumClassify" column="CLASS_ID" ></many-to-many>
</set>
<set name="plantsClassifyes" table="ADMIN_PLANT_CLASS_TABLE" inverse="false">
<key column="USER_ID"></key>
<many-to-many class="com.ds.classify.model.PlantsClassify" column="CLASS_ID"></many-to-many>
</set>
</class>
</hibernate-mapping>

BacteriumClassify映射文件(plantsClassifyes与BacteriumClassify类似)

<hibernate-mapping>
<class name="com.ds.classify.model.PlantsClassify" table="P_SPECIMEN_CLASS_TABLE">
<id name="classId" type="java.lang.Long">
<column name="CLASS_ID" ></column>
<generator class="sequence">
<param name="sequence">PLANT_CLASS_SEQ</param>
</generator>
</id>

<property name="className" type="java.lang.String">

<column name="CLASS_NAME"></column>

</property>

<property name="classLatin" type="java.lang.String">

<column name="CLASS_LATIN"></column>

</property>

<property name="parentId" type="java.lang.String">

<column name="PARENT_ID"></column>

</property>

<property name="classDescribe" type="java.lang.String">

<column name="CLASS_DESCRIBE"></column>

</property>

<property name="classLevel" type="java.lang.String">

<column name="CLASS_LEVEL"></column>

</property>

<set name="childClassify" cascade="delete">

<key column="PARENT_ID"></key>

<one-to-many class="com.ds.classify.model.PlantsClassify"/>
</set>
<set name="customers" table="ADMIN_PLANT_CLASS_TABLE" inverse="true">
<key column="CLASS_ID"></key>
<many-to-many class="com.ds.customer.model.Customer" column="USER_ID"></many-to-many>
</set>
</class>
</hibernate-mapping>

中间表关系
<hibernate-mapping>
<class name="com.ds.customer.model.BacteriumAdminClassify" table="ADMIN_BACTERIUM_CLASS_TABLE">
<composite-id>
<key-property name="classId" type="java.lang.Long">
<column name="CLASS_ID" />
</key-property>
<key-property name="userId" type="java.lang.Long">
<column name="USER_ID" />
</key-property>
</composite-id>
</class>
</hibernate-mapping>
删除一个customer时 无法删除中间表相关的数据 提示违反完整约束条件
这不,只是因为没有父亲有一个掘烂儿子吗?

你在中间表的存在是AB两个表之间的腊简关系,你怎判局漏么可以使用中间操纵他们。