Cascade delete in CMP 1:M relationship

All,
I have 2 CMP entity beans with 1:M relationship and cascade delete option setup. All functions of Add/Mod are working fine.
Even cascade delete is getting trigged but not executing properly every time. Out of more than 100 records in the child table, only 99 are getting cascade deleted. I am deploying the beans using embedded OC4J which comes with JDeveloper.
Is anyone aware of any such limitations or faced similar problem before ? Database tables don't have any integrity constraint setup.
Thanks,
Dhiraj

The problem is that by making the AddrXRef privately owned it cannot be reparented. Once it is removed from it's parent's list (either one) it will be deleted. To achieve what you're trying to do you'll need to delete the old incorrect AddrXRef and replace it with a new correct one.
From the TopLink Developer's Guide[1]:
When you tell TopLink that a relationship is privately owned, you are specifying that:
* If the source of a privately owned relationship is deleted, then delete the target.
* If you remove the reference to a target from a source, then delete the target.
--Shaun
[1] http://www.oracle.com/technology/products/ias/toplink/doc/10131/main/_html/uowbas007.htm#i1134011

Similar Messages

  • Problem with cascade delete in CMP one-to-one relationship

    I am not able to cascade delete for one-to-one relationship. Even though relationship seems to be setup correctly, record from the second table is not deleted.
    Following is the structure of tables i am using:
    First Table(vcc_lrmc) -- LRMCBean
    lrmc_id pk (Bean field is id)
    lrmc_dtl_id (Bean field islrmcDtlId)
    Second Table (vcc_lrmc_dtl) -- LRMCDetailBean
    lrmc_dtl_id (pk) (Bean field islrmcDtlId)
    lrmc_id (Bean field id)
    One to one bidirectional relationship has been setup with CMR fields moreLRMC and mainLRMC.
    section of ejb-jar is as follows:
    <ejb-relation>
    <ejb-relation-name>LRMCMainToDetail</ejb-relation-name>
    <ejb-relationship-role>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>LRMC</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>moreLRMC</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <multiplicity>One</multiplicity>
    <cascade-delete/>
    <relationship-role-source>
    <ejb-name>LRMCDetail</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>mainLRMC</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    section of orion-ejb-jar is as follows:(Bidirectional mapping)
    <entity-deployment name="LRMC" data-source="jdbc/VCCDS" table="VCC_LRMC">
    <cmp-field-mapping name="moreLRMC">
    <entity-ref home="LRMCDetail">
    <cmp-field-mapping name="lrmcDtlId" persistence-name="LRMC_DTL_ID"/>
    </entity-ref>
    </cmp-field-mapping>
    </entity-deployment>
    <entity-deployment name="LRMCDetail" data-source="jdbc/VCCDS" table="VCC_LRMC_DTL">
    <cmp-field-mapping name="mainLRMC">
    <entity-ref home="LRMC">
    <cmp-field-mapping name="id" persistence-name="LRMC_ID"/>
    </entity-ref>
    </cmp-field-mapping>
    </entity-deployment>
    Is there anything else need to be setup for Cascade delete or is there anything wrong the way one-to-one relationship has been setup.
    Pls. advice.
    Thanks
    Dhiraj

    Is it happening because of this bug.
    Cannot create a 1:1 bi-directional CMR for entity beans when database tables are reverse engineered. (2447364)
    Anyone, any idea on this ?
    Cheers,
    Dhiraj

  • Let the database doing cascade deletion for privateOwned relationship

    Hi,
    I have two tables: parent, child. I mapped the parent to child as a one-many private owned relationship. The child table have a foreign key reference back to parent table. The constraint is like this
    alter table child add constraint FK_CONSTRAINT foreign key (parentid) reference parent (parentid) on delete cascade;
    I would the cascade deletion is done by database (as it is "on delete cascade" in the constraint) rather by the toplink. (This is exactly what you will do when use JDBC. another reason is that if I let the TopLink do the cascade deletion, I got a deadlock! If I remove the cascade deletion from topLink, I do not have the deadlock).
    Is there anyway I can turn off the cascade deletion from topLink, but at the same side keep the private owned relationship(because it is indeed privately owned)?
    Any help is really appreciated.
    jason

    Setting a no-op sql solves the cascade deletion problem. However, if I really want to remove a child from the parently, I ends up using the same no-op sql. I can not delete child independently.

  • Weblogic 9.1, EJB 2.0, Oracle 9i: Cascade delete Error

    Hi All,
    I am facing an error with the cascade-delete facility in ejb2.0 with weblogic 9.1
    Assume that I have the following relation:
    <ejb-relation>
    <ejb-relation-name>TeacherEJB-StudentEJB</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>teacher-has-student
    </ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>TeacherEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>teacher</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>student-has-teacher
    </ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <cascade-delete/>
    <relationship-role-source>
    <ejb-name>StudentEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>student</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type><cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    Now when I have to delete one record from the DBSTUDENT table, what i do is the following:
    StudentHomeLocal.remove(studentModel.getStudentId());
    The above statement throws an SQLException staying it can't update TeacherID in DBSTUDENT (PK of DBTEACHER, FK in DBSTUDENT) with NULL.
    The same code is working perfectly well in Weblogic 8.
    I even tried deleting the local directly by the following statement:
    StudentLocal.remove();
    But this too doesn't work.
    I also tried by removing the <cascade-delete/> attribute from the ejb-jar.xml file and updating the 'on-delete cascade' option in the database, but this too did not work.
    There is another option of <db-cascade-delete> in weblogic-cmp-rdbms-jar.xml that I tried but this too did not work.
    In short, I have tried the following cases but to no avail:
    1. Mention cascade delete in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar and in the database.
    2. Mention nothing in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar but 'on cascade delete' mentioned in the database.
    3. Mention cascade delete in ejb-jar.xml and db-cascade-delete mentioned in weblogic-cmp-rdbms-jar.xml.jar and 'on cascade delete' in the database.
    4. Remove all cascade delete from the ejb-jar.xml,the weblogic-cmp-rdbms-jar.xml and from the database.
    Neither of the above work.
    Kindly help ASAP.
    Thanks in advance,
    Sachidanand.

    Hi All,
    I am facing an error with the cascade-delete facility in ejb2.0 with weblogic 9.1
    Assume that I have the following relation:
    <ejb-relation>
    <ejb-relation-name>TeacherEJB-StudentEJB</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>teacher-has-student
    </ejb-relationship-role-name>
    <multiplicity>One</multiplicity>
    <relationship-role-source>
    <ejb-name>TeacherEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>teacher</cmr-field-name>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>student-has-teacher
    </ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <cascade-delete/>
    <relationship-role-source>
    <ejb-name>StudentEJB</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>student</cmr-field-name>
    <cmr-field-type>java.util.Collection</cmr-field-type><cmr-field>
    </ejb-relationship-role>
    </ejb-relation>
    Now when I have to delete one record from the DBSTUDENT table, what i do is the following:
    StudentHomeLocal.remove(studentModel.getStudentId());
    The above statement throws an SQLException staying it can't update TeacherID in DBSTUDENT (PK of DBTEACHER, FK in DBSTUDENT) with NULL.
    The same code is working perfectly well in Weblogic 8.
    I even tried deleting the local directly by the following statement:
    StudentLocal.remove();
    But this too doesn't work.
    I also tried by removing the <cascade-delete/> attribute from the ejb-jar.xml file and updating the 'on-delete cascade' option in the database, but this too did not work.
    There is another option of <db-cascade-delete> in weblogic-cmp-rdbms-jar.xml that I tried but this too did not work.
    In short, I have tried the following cases but to no avail:
    1. Mention cascade delete in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar and in the database.
    2. Mention nothing in ejb-jar.xml and nothing mentioned in weblogic-cmp-rdbms-jar.xml.jar but 'on cascade delete' mentioned in the database.
    3. Mention cascade delete in ejb-jar.xml and db-cascade-delete mentioned in weblogic-cmp-rdbms-jar.xml.jar and 'on cascade delete' in the database.
    4. Remove all cascade delete from the ejb-jar.xml,the weblogic-cmp-rdbms-jar.xml and from the database.
    Neither of the above work.
    Kindly help ASAP.
    Thanks in advance,
    Sachidanand.

  • Cascade delete in container or database schema?

    I am creating a database schema which I want to map EJB CMP Entity Beans onto. There are a number of relationships in the schema where I want to cascade deletion if a parent record is deleted and a number of relationships where I want to prevent deletion of parent records if child records exist for the relationship.
    I am wondering whether it is better to implement this in the database schema (Oracle) or in the container (JBoss 3.2.2)? I believe it is possible to implement cascading delete in the container but I am not sure about preventing delete in the container? Is there a way I could do it programmatically? I want to use CMP though so I'm not sure there would be much scope for that.
    Are there any rules as to which approach is better? Will the container have a problem if I implement it in the database schema? Obviously the ejbRemove may throw an exception if I prevent deletion in a relationship but that is fine. I believe it is not a good idea to implement it in both the container and schema as there will be a conflict when they both try to delete records.
    Thanks.

    Container's cascade-deleting in jboss(tm)3.2.x working properly with any scope:
    This example with 1 scope:
        <relationships>
            <ejb-relation>
                <ejb-relation-name>Region-Town</ejb-relation-name>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>region-has-towns</ejb-relationship-role-name>
                    <multiplicity>One</multiplicity>
                    <relationship-role-source>
                        <ejb-name>RegionBean</ejb-name>
                    </relationship-role-source>
                    <cmr-field>
                        <cmr-field-name>regionTowns</cmr-field-name>
                        <cmr-field-type>java.util.Set</cmr-field-type>
                    </cmr-field>
                </ejb-relationship-role>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>town-belongs-to-region</ejb-relationship-role-name>
                    <multiplicity>Many</multiplicity> <cascade-delete/>
                    <relationship-role-source>
                        <ejb-name>TownBean</ejb-name>
                    </relationship-role-source>
                    <cmr-field>
                        <cmr-field-name>region</cmr-field-name>
                    </cmr-field>
                </ejb-relationship-role>
            </ejb-relation>
        </relationships>

  • Db-cascade-delete for other databases than Oracle?

    I have two entity beans with a one to many relationship. The database designers have implemented a cascading delete between the two tables for the entity beans. How should the deployment descriptors be written for this to work properly? From what I understand I will need to use the <cascade-delete /> tag in ejb-jar.xml and <db-cascade-delete /> in weblogic-cmp-jar.xml. However this document http://e-docs.bea.com/wls/docs81/ejb/entity.html states that <db-cascade-delete /> only works for Oracle, and I'm using DB2. Does this mean that I have to remove the cascading delete in the database and only enable it in ejb-jar.xml, or will <db-cascade-delete /> work for other databases than Oracle?
    /Björn

    To get the certified answer I'd ask a tech support rep. Unofficially, if DB2 supports cascade delete then I would expect that the EJB container will work with that. There are issues surrounding certification of features against specific databases and I'm not up on all of these so I'd check with support.

  • Problem with cascade delete and remove bean

    I am working with two entity beans that map to two tables that have a foreign key relationship. Table B has a foreign key to A and in the database that foreign key is set for cascaded updates and cascaded deletes.
    The problem occurs when the the sytem first tries to remove bean 1 (mapped to table A) and then remove bean 2 (mapped to B) where bean 2 is associated with bean 1 with a foreign key relationship. The first remove works but then when it tries to remove bean 2 it throws a very ugly "CORBA TRANSACTION_ROLLEDBACK 9998" Maybe exception. My guess is that the reason is because bean 2's reocrd in the database was deleted when bean 1 was removed but the 'bean object' was not removed from the container.
    When I go into our Application Server and look at how it see's the tables, it show the wrong relationship. It shows a restrict delete and a restrict update realationship.
    My question is, am I wrong to think that this is a application server problem or a configuration problem? It seems to me that attempting to remove a non-existant record should not cause an error. It won't cause any SQL exceptions. Is this a flawed viewpoint? As a work around I made sure that the dependent records are deleted first but it kind of defeats the point of cascaded deletes.
    We have a limited number of support calls, should I use one or am I at fault here?

    If the database removes the record from the second
    table, why is the system trying to remove it once
    again? You should try to remove an entity from a
    single place, should it be the database or the
    application. Don't try to remove it twice.
    Regards,
    DimitarI could do this but it is a huge pain in my ass. The problem is that you might want to remove the dependent bean without removing it's parent. The object structure is a little questionable, I'll admit that. It is, as they say, the eleventh hour and I can't really change that now.
    The way this work is that the server gets a list of objects marked either as new, modified, or deleted. It then relates those changes back to the database.
    In this case we have two lists(which makes me realize where the class structure sucks.) In order to do what you suggest I would have to get all the deleted parent objects and then search all the deleted child objects for ones that have the parent's key in them.
    It would be prefferable to fix the class structure but again this is not an option.
    Anyone want to answer the question I asked?

  • Privately Owned and Cascade Delete in DB

    HI,
    What is the relationship between setting privately owned in Toplink vs creating a cascade delete in Oracle DB? If I've the cascade delete in DB then what is the advantage of setting the privately owned flag in toplink?
    Thanks

    If you only set the cascade delete option in the database, then TopLink will have no knowledge that the private object was deleted (or that it is private in general). This would mean that TopLink would not remove the private object from the cache or process it as have being deleted. In general this may not cause your app any direct issues if you never read the private object directly as it will eventually garbage collect from the cache.
    Making the relationship privately own in TopLink will also ensure the following:
    - If you replace the private object with another, or set it to null, TopLink will delete the old object on the update of the source. Cascade delete only works on deletion.
    - If the relationship is a 1-m and you remove an object from the collection it will be removed.
    - If you refresh the parent object, by default the child will also be refreshed.
    - If you merge the parent object, by default the child will also be merged.

  • Cascade delete in privatelyownedrelationships

    If a one-to-many mapping is defined as a privately owned relationship, when I delete a record from this collection, I get integrity constraint exception stating that
    'child record exits', in a privately owned collection, dont the child records get deleted automatically,
    We are removing a record from the collection and trying a commit thru UOW. thanks

    Looks like a bug in the way the cascade delete is being done, if we remove the constraints then the cascade delete works.

  • Cascade delete in hibernate 3

    i am having a problem deleting child object
    here is my code
    my hibernate files are generated with xdoclet
    I want to remove an object AFVALSTOF with all it's childs. the relationship is bi-directional. parent object is AFVALSTOF and as example child is OVERBRENGER. the relationship is obligated (not-null="true")
    By viewing the hibernate logging i can see that the key field of the child is update to null first but this is an obligated field.
    Can anyone help me on how to define my relationship so i can execute the cascade delete?
    This is a part of my parent object (AFVALSTOF) which causes
    problems
    /     private Set overbrenger = new HashSet( );
         * @hibernate.set tablename="overbrenger" lazy="true" inverse="false"
         * cascade="all-delete-orphan"
         * @hibernate.collection-key column="ovbr_afvs_id"
         * @hibernate.collection-one-to-many class="be.milieuinfo.imjv.database.model.afval.Overbrenger"
         * @return Set
         public Set getOverbrenger() {
              return overbrenger;
         * @param overbrenger
         * Overbrenger
         public void setOverbrenger(Set overbrenger) {
              this.overbrenger = overbrenger;
    THIS IS THE CHILD (OVERBRENGER) which has a relationship to the PARENT called AFVALSTOF
    private Afvalstof afvalstof ;
    * @hibernate.many-to-one column="ovbr_afvs_id" class=
         * "be.milieuinfo.imjv.database.model.afval.Afvalstof"
         * not-null="true" inverse="true" cascade="all"
    * @return Afvalstof
    public Afvalstof getAfvalstof() {
         return afvalstof ;
    * @param afvalstof
    public void setAfvalstof(Afvalstof afvalstof) {
         this.afvalstof = afvalstof ;
    thnx
    Stefaan

    <?xml version="1.0"?>
      <!DOCTYPE hibernate-mapping PUBLIC
        "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
      <class name="com.orly_otero.patterns.VO.ArticleVO" table="tblArticles">
        <id name="idArticle" type="long">
          <column name="id_Article" not-null="true"/>
          <generator class="native"/>
        </id>
        <property name="title" type="string">
          <column name="Title" length="200" not-null="true"/>
        </property>
        <property name="abstracT" type="string">
          <column name="Abstract" length="2000" not-null="true"/>
        </property>
        <property name="keywords" type="string">
          <column name="Keywords" length="200" not-null="true"/>
        </property>
        <property name="type" type="string">
          <column name="type" length="1" not-null="true"/>
        </property>
        <property name="position" type="integer">
          <column name="position" not-null="false"/>
        </property>
        <property  name="isBriefContribution" type="boolean">
          <column name="isBriefContribution" not-null="false"/>
        </property>
        <many-to-one name="issueVO" column="id_Issue" class="com.orly_otero.patterns.VO.IssueVO" not-null="true"/>
        <set name="authorsVO" table="tlbArticlesAuthors" lazy="true" cascade="save-update">
          <key column="id_Article"/>
          <many-to-many class="com.orly_otero.patterns.VO.AuthorVO" column="id_Author"/>
        </set>
        <set name="sectionsVO" inverse="true" lazy="true" cascade="all" order-by="position ASC">
          <key column="id_Article" not-null="true"/>
          <one-to-many class="com.orly_otero.patterns.VO.SectionVO"/>
        </set>
      </class>
    </hibernate-mapping>

  • Cascade Delete thru Cross-Reference Table?

    I'm setting up cascade delete rules in my database and I wonder if there's a way to cascade delete through a cross-reference table?
    I have a table: "projects" that can have many "tasks" (also a table). A "participation" table is the cross-reference between them and it holds other information about the relationship.
    So I know I can do a cascade delete so that the participations will get deleted when either the project or the task get deleted, but can I rig something so that when I delete a project all the participations and tasks get deleted?
    Quick answers are greatly appreciated,
    Janice

    I recommend you to post this topic as well here:
    Forums Home » Oracle Technology Network (OTN) » Products » Database » SQL and PL/SQL
    Discussion of Oracle SQL and PL/SQL issues
    PL/SQL
    Joel Pérez

  • Why lock-order can use in cascade delete?

    Hi.
    http://edocs.beasys.com/wls/docs81/ejb/DDreference-cmp-jar.html#1113798
    #Function
    #Use this flag to specify the database locking order of an entity bean
    #when a transaction involves multiple beans and exclusive concurrency.
    #The bean with lowest number is locked first.
    #This flag should only be used to prevent a deadlock situation and,
    currently,
    #only applies when a transaction performs cascade deletes.
    #This flag is only used for cascade delete currently.
    Why lock-order can use only cascade deletes sisuation?
    This is fake fuction ins't it....
    Makoto Shibata

    I'm not sure that I understand what you mean by 'fake function', but
    as I recall, the reason why this feature works for cascade delete is because
    the feature was specifically introduced because deadlocks were detected
    when using cascade delete in heavily concurrent environments.
    -thorick

  • [EJB:010142] error for cascade-delete

    Hi,
    I'm getting [EJB:010142] error (Instance of EJB <relatedEJB> with primary key <pk> does not exist) while trying to implement a straight-forward cascade-delete option in ejb-jar.xml for a one-to-many relationship using EJB 2.1.
    While the cascade-delete works well for a one-to-one relationship, it is throwing this error for one-to-many relationship.
    DB used is Oracle 10g XE. Server is Weblogic 9.2 MP4.
    Given below the exact error:
    javax.ejb.EJBException: EJB Exception:: java.lang.IllegalArgumentException: [EJB:010142]Instance of EJB 'LineItem' with primary key 'li8' does not exist.
         at Test1.Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.remove(Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.java:531)
         at Test1.Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.remove(Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.java:496)
         at Test1.Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.clear(Order_cpl9bk__WebLogic_CMP_RDBMS_lineItems_Set.java:369)
         at Test1.Order_cpl9bk__WebLogic_CMP_RDBMS.__WL_superEjbRemove(Order_cpl9bk__WebLogic_CMP_RDBMS.java:1667)
         at weblogic.ejb.container.manager.DBManager.remove(DBManager.java:1664)
         at weblogic.ejb.container.internal.EntityEJBLocalObject.remove(EntityEJBLocalObject.java:125)
         at Test1.Order_cpl9bk_ELOImpl.remove(Order_cpl9bk_ELOImpl.java:577)
         at jsp_servlet.__cascadedeletetest._jspService(__cascadedeletetest.java:198)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3272)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2019)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1925)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1394)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    ; nested exception is: java.lang.IllegalArgumentException: [EJB:010142]Instance of EJB 'LineItem' with primary key 'li8' does not exist.
         at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:141)
         at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:657)
         at weblogic.ejb.container.internal.BaseEJBLocalHome.handleSystemException(BaseEJBLocalHome.java:150)
         at weblogic.ejb.container.internal.EntityEJBLocalObject.remove(EntityEJBLocalObject.java:132)
         at Test1.Order_cpl9bk_ELOImpl.remove(Order_cpl9bk_ELOImpl.java:577)
         at jsp_servlet.__cascadedeletetest._jspService(__cascadedeletetest.java:198)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3272)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2019)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1925)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1394)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    I have verified that the lineitem record that it is trying to delete is existing in the db table.
    Please let me know what could be the possible issue.
    Thanks,
    Vinod

    Any ideas yet???
    Is there any knowledgebase (KB) article to read about this???

  • Hibernate child cascade delete child???

    i am facing a problem on the cascade delete of a parent object, i try to explain the problem by example.
    Parent object C
    Child object D,E,F
    i want to delete the parent object "delete(c) ".
    before the parent can be deleted the child D,E and F has to be deleted.
    My relations are defined with cascade="all-delete-orphan" in the parent
    object. In my child no cascade is defined.
    When i check the logging on deletion of the object i see that hibernate
    tries to update reference in the child to the parent by setting the value to
    null. But since the the reference is obligated (NOT NULL in database)
    i get a not null constraint violation.
    My first question is why does hibernate not delete the child record instead of updating the reference (since my child object is remove
    from my collection in the parent object)?
    Could some one tell me what i am doing wrong? or does there not exist a solution.
    thnx

    First, is that a typo? The docs for 3.1 that I'm looking at say "all,delete-orphan", but you have "all-delete-orphan".
    Second, I thought (and it's been a long time since I've needed to do this) that you defined the cascading in the child. I could be wrong though.
    What kind of relationship is this? The docs say that delete-orphan only applies to one-to-many.
    You might want to go through the pertinent sections of these if you haven't already:
    http://www.hibernate.org/hib_docs/v3/reference/en/html/mapping.html
    http://www.hibernate.org/hib_docs/v3/reference/en/html/collections.html
    [url http://www.hibernate.org/hib_docs/v3/reference/en/html/objectstate.html#objectstate-transitive]http://www.hibernate.org/hib_docs/v3/reference/en/html/objectstate.html#objectstate-transitive

  • Can Designer handle Cascade Delete w/ Recursion?

    Hello,
    Does anyone know if Designer client Forms have a problem doing recursive relationships set to Cascade Delete in the FK? No problem on the server side code but when we try to generate the form since changing the recursive FK to Cascade Delete we get the error:
    CDG-01131 ERROR: Module &lt;form name&gt;: Recursion found in referential integrity rules (foreign key &lt;FK&gt; on table &lt;table&gt;)
    We are using Designer 6i Patch 4.1.1 and Developer 6i_R2 Patch 7
    We are planning to upgrade soon to 4.5 and patch 10.
    Thank you for your input!

    You may override getQueryHitCount on the ViewObject
    and use a custom query to return the
    estimatedRowCount using the right query for your
    target db.But I've checked SQL92 in my connection and it seem this isn't legal syntax.
    Alternatively you may provide a custom SQLBuilderImpl
    extending 'SQL92SQLBuilderImpl' and provide a custom
    query by overriding the method
    public String getQueryHitCountSQL(RowSet rs)We've solved this case by doing the cacade delete in the database so no middle-tier logic is required.
    However, this is not the end of our SQL92 problems. We're trying to get outer-joins to work using SQL92 syntax and a similar "SELECT * FROM (SELECT..." problem pops up.
    See
    Outer joins in non-Oracle RDBMS
    Tony.

Maybe you are looking for

  • I need to display a keynote on 2 flat screens with my MacBook Air via hdmi. I am not sure how to do it.

    I Am giving a presentation and was just informed that I will be using 2 flat screen tvs as my monitors and I need to use hdmi cables. I am lost as to how to do this. I know there is a thunderbolt to hdmi adapter but is there a splitter so I can put i

  • No category for this post

    This is about browsing the app store. I am tired of trying to browse the app store, because everytime I select an app to read up on and when I'm done reading up on it and I click the back button, it seem to always send me back to the beginning to sta

  • Macbook projector problems

    I'm having some issues with my Macbook being run through a Dell 3200MP DLP projector. Until today, the MB seemed to recognize the Dell projector, but the projector's display would repeatedly show "searching for signal". As of today, the MB doesn't ev

  • Ship-to Party details- not from Customer master

    Hi all, I need to fetch ship to party details for SO and those details should not be from Customer master(order specific including name, location and region) For that  I am using following code.       SELECT vbeln              kunnr              adrn

  • Probleme mit Datensicherung

    Hi, hatte bislang noch nie Probleme mit der Time Capsule und Time Machine. Seite neuestem kommt aber die Meldung: " Time Machine konnte das Backup „Walter Delle Karths Time Capsule" nicht abschließen. Das Image des Backup-Volumes „/Volumes/Data/delle