Привет, я могу добавить запись, но не могу удалить запись.
выдает следующую ошибку:
[ERROR] 2010-02-20 13:38:16 (JDBCExceptionReporter.java:logExceptions:78) ORA-02292: integrity constraint (BANKNET.FK_DDA_DEAL_ADVISOR) violated - child record found
[ERROR] 2010-02-20 13:38:16 (AbstractFlushingEventListener.java:performExecutions:301)
Could not synchronize database state with session
org.hibernate.exception.ConstraintViolationException: could not delete: [com.bofa.crme.dda.domain.ManualDDAData#10041]
Вот мои файлы сопоставления:
дочерний стол:
<hibernate-mapping>
<class name="com.bofa.crme.dda.domain.DealAdvisor" table="DDA_DEAL_ADVISOR" schema="BANKNET">
<composite-id name="comp_id" class="com.bofa.crme.dda.domain.DealAdvisorPK">
<key-property name="advisorNm" column="ADVISOR_NM" type="java.lang.String" length="100" access="property"/>
<key-many-to-one name="ddaDeal" column="DDA_DEAL_NO" class="com.bofa.crme.dda.domain.ManualDDAData" />
</composite-id>
<property name="modifiedBy" column="MODIFIED_BY" type="java.lang.String" update="true" insert="true" access="property" />
<property name="modifiedDt" column="MODIFIED_DATE" type="java.util.Date" update="true" insert="true" access="property"/>
</class>
</hibernate-mapping>
Родительская таблица:
<hibernate-mapping>
<class name="com.bofa.crme.dda.domain.ManualDDAData" table="DDA_DEAL" schema="BANKNET" >
<id name="ddaDealNumber" column="DDA_DEAL_NO" type="java.lang.Long">
<generator class="sequence">
<param name="sequence">BANKNET.DDA_DEAL_ID_SEQ</param>
</generator>
</id>
<property name="clientGCI" type="java.lang.String" update="true" insert="true" access="property" column="GCI" />
<set name="dealAdvisors" inverse="true" cascade="all,all-delete-orphan" lazy="false">
<key column="DDA_DEAL_NO" not-null="true" on-delete="cascade"/>
<one-to-many class="com.bofa.crme.dda.domain.DealAdvisor" />
</set>
</class>
</hibernate-mapping>
Кто-нибудь знает, почему он не работает?