Cascading Delete in BC4J-UIXml application

Morning all,
I have a problem with a UIXml application that I was wondering somebody could help me with. Since I am new to this technology, please excuse the simplistic nature of the question.
I have a BC4J application working through UIX pages. In this application I have a form that deletes a record from the table. However, I am unable to determine how to perform an automatic cascading delete on the record since it has child records in another table.
Please advise. I shall update this thread after a successful workaround in order to provide a reference for others who may encounter this problem.
Thanks in advance for reading this post.
Adeel

This was resolved in the entity's association properties.

Similar Messages

  • BC4J: Implementing cascade-delete

    Hi,
    I'm using BC4J (JDev 9.0.3.4) and I'd like my composite associations with cascade delete to realy behave like one would usualy expect... that is, when the master entity is deleted, the details are not only deleted from the database but from the view object and entity caches as well. Is there a way to accomplish that?
    I was thinking about extending EntityImpl and overiding the remove or doDML method to remove the detail entities from the vo and eo caches. Is this the correct approach? Any other options?
    Thanks,
    Leonardo

    If you use the JDev 9.0.3.5 or later, you could
    select "Implement cascade delete" option in the
    Association properties for your composition
    association. This flag enables the framework to
    remove all details for a master when the master is
    deleted.Hi, Thanks for your reply.
    We're using 9.0.3.4 and unfortunately upgrading is not an option for us at this time. What would be the correct way to implement it using 9.0.3.4?
    Thanks,
    Leonardo Bueno

  • 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?

  • Virtual private database and cascade delete

    We can't secure rows deleted by cascade delete by vpd.
    User "A" have right to delete row "1" but don't have right to delete row "2".
    If user "A" delete row "1", database will delete also row "2" by cascade delete.
    Why it is possible to delete row "2"?

    Either of the two options (a policy that queries the base table or propagating the security columns to the child tables) should work.
    My preference from a data model standpoint would be to have a policy that queries the base table so that the security information can be maintained in exactly one place. But if your application is frequently querying the child tables without reference to the parent table, joining to the parent table, particularly if data volumes are such that an IN would be less than ideal, there may be performance issues to this approach.
    Copying the columns creates a potential data integrity problem-- if you change the security on a base table row, you may forget to change the security on all the child records. But that issue may not be significant if the security is essentially static once the rows are created. And it's definitely easier to tune.
    You may also want to create views that join the parent and child tables and grant users access to these views rather than to the child tables directly, which would allow you to have a single policy on the base table and get most of the benefits of the first option with less performance problems if data volumes make an IN less than ideal.
    Justin

  • How change JhsModel - FK FlexItemDefinition- FlexItem cascade delete?

    JHeadstart 10.1.3.2
    We are using FlexItems in our application.
    The JhsModel implementation, shipped in Jar file jhsadfrt-10.1.3.jar, contains the underlying ADF BC objects for the FlexItem functionality.
    We would like to change the functionality somewhat: when the user removes a flex item definition, we want to allow that and have all flexitems (instances of that definition) removed through a cascade delete. Unfortunately, the Associations/EOs in the JhsModel have not been set up that way.
    1) is there a specific reason why you chose the on delete restricted implementation or why we should not want to change that?
    2) what is a good strategy for making that change? (unzipping the jar, editing the xml files, rejarring?)
    thanks for your help
    Lucas

    Lucas,
    1. No good reason, we will change this for release 11.
    2. I would not recommend to change the jheadstart jar file. ADF Business Components has a mechanism called substitutions that you can use to specify your custom association. ALternatively, you can change the action behind the delete button and have it call an application module method that first deletes the children.
    Steven Davelaar,
    JHeadstart Team.

  • How to delete a file from application server?

    Hi gurus,
    i want delete a file from application server . can any one tell me the BAPI/Fm .
    thanks in advance

    See the replies of the thread;
    How to delete  File from the Application Server,ABAP
    But i can smell something fishy in both  The specified item was not found. and The specified item was not found. style of posting questions. Also both of you have similar questions in your profile....
    Hmmm, Mods have to take care of the Rest...
    Regards
    Karthik D

  • 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.

  • How to delete file manually from application data base

    Hi All,
    Could anyone tell me how to delete file manually from application database.
    Thanks In advance
    Regards
    SAN
    Edited by: Sanjay  Nair on Sep 2, 2008 10:51 AM

    Closed

  • BPC 7.5NW : How to delete all data in application

    Hi,
    I need to delete transactional data in an planning application. I've run a "clear" and I clears all the data, but unfortunately, it's "only a delta" delete. So there are still several datapackage request in my application. Of course the sum is zero, but there are still lot's of data.
    How to I do a full delete af all transactional data and request ?
    i need this in order to delete all masterdata and reload it.
    Thank you,
    Joergen Dalby

    Hi,
    Easiest way of complete deletion of transactional data from application is from back end.
    Login into back end(BPC BW) via logon pad
      --Goto tcode RSA1 and click on infoproviders tab
       --Search for Application (from where you want to delete data)
       --Select the application and change from planning mode to data load mode from context menu
       --Select delete data from context menu
         --Select No to keep dimension data
       --Once data deleted from application(infocube) change back planing mode(from context menu)
    hope it works..
    regards,
    Raju

  • How to solve the error while  Deploy a BC4J JSP Application using tomcat,

    hello,
    how to avoid the following error?
    i am using jdevloper for devloping jsp applications.
    after that i am calling the jsp page using tomcat4.0 ,i followed the steps according docs by jdev team,
    i am getting the following error how to solve this,
    can one help?
    =============================
    type Exception report
    message Internal Server Error
    description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
    exception
    org.apache.jasper.compiler.CompileException: /AccountView_Browse.jsp(4,0) Unable to load class oracle.jbo.html.jsp.datatags.ApplicationModuleTag
    at org.apache.jasper.compiler.TagBeginGenerator.init(TagBeginGenerator.java:139)
    at org.apache.jasper.compiler.JspParseEventListener$GeneratorWrapper.init(JspParseEventListener.java:829)
    at org.apache.jasper.compiler.JspParseEventListener.addGenerator(JspParseEventListener.java:153)
    at org.apache.jasper.compiler.JspParseEventListener.handleTagBegin(JspParseEventListener.java:1039)
    at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:221)
    at org.apache.jasper.compiler.DelegatingListener.handleTagBegin(DelegatingListener.java:216)
    at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:852)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:1145)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:1103)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:1099)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:214)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
    at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:548)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:176)
    at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:188)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
    at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
    at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
    at java.lang.Thread.run(Thread.java:536)
    ====================
    thanks
    pullareddy

    I had very similar problems with adding the correct JDeveloper .jar files to Tomcat's lib folder, but did eventually resolve my issues.
    The problem I am having now, however, is the following error message:
    Error Message: oracle.jbo.html.RequestParameters.addParameter(Ljava/lang/String;Ljava/lang/String;)V
    Yes, I have deployed the bc4jhtml.jar file from JDeveloper to Tomcat\common\lib!
    My web-app is a very simple BC4J JSP application. I have one BC4J component in its own project and JAR file, and one JSP referencing that BC4J component - I deploy the BC4J JAR along with the WAR file from the JSP project. Needless to say, the JSP works fine within JDeveloper..!
    I'm using JDev 9.0.3 and Tomcat 4.1.12. Does anyone have any suggestions?
    Thanks,
    S.

  • How do I delete icons of old applications in the menu bar?

    How do I delete icons of old applications in the menu bar? I've tried holding down all three keys, control, option and command as well as every combination of them in twos and three and then clicking on the menu bar icon I want to remove and I only get the option to use the software, not to delete it.

    Hold command and drag them off the Menu Bar, drag them at least a couple of inches. (or 50mm)

  • I have purchased a new iMac, with Safari 5.0.5, but it won't retain bookmarks, I thought I can download a new Safari from Apple. So I deleted Safari from the application folder.

    I have purchased a new iMac, with Safari 5.0.5, but it won't retain bookmarks, I thought I can download a new Safari from Apple. So I deleted Safari from the application folder.
    Then I tried to download Safari from Firefox but after finish download, what I got was a dmg file, with a pkg icon (an opened box) and it can't be installed. Same with Google Chrome.
    My question is: how can I download Safari? And will it retain bookmarks?

    Reinstall Safari from the Optional Installs.pkg on your Mac install disc that came with your iMac. Or in your case, you use Pacifist to extract the Safari app from the .dmg file.
    To bookmark a webpage:
    Go to the webpage you want to bookmark. If you use tabs, you can open multiple webpages in tabs to bookmark them as a collection.
    Choose Bookmarks > Add Bookmark, or Bookmarks > “Add Bookmarks for These Tabs.”
    Type a name for the bookmark or collection in the dialog that appears.
    Specify where you want to keep the bookmark or collection. You can add it to the bookmarks bar, the Bookmarks menu, or to a collection if you have created any.
    Click Add.
    To add a bookmark quickly, click the Add button in the toolbar, or drag the webpage’s icon from the address field to the bookmarks bar.
    To see your bookmarks, choose Bookmarks > Show All Bookmarks.
    In the future, rather then deleting an app, come here and ask for help first. More times then not, you will save yourself time and trouble.

  • Deleted the natve Tasks Application that came with my BB Curve

    I have mistakingly deleted the natve Tasks Application that came with my BB Curve and now need to reinstall it.
    How do i go about doing that?  Your assistance will be appreciated as i cannot live with out. 
    meeemo

    You didn't state what model curve you have (8300, 8310, 8320, 8350, 8520?), but download from your carrier same OS that is on your device now (Look at Options > About, third line down beginning with a "v.4.xxx") and install that OS to your PC.
    Then, run Desktop Manager > Application Loader, and check the box for the Task app.
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Foreign keys on cascade delete rules are not migrated

    hello folks, i tried to migrate a database from sql server 2005 to oracle 10g express using SQL Developer 1.5.5 and noticed that the cascade delete option of the foreign keys was ignored by the tool.
    I'd like to know if it's a limitation of the tool or a bug. I have over 500 fks with such configuration and it would be simply impossible to manually configure every migrated fk in oracle.
    thanks all.

    Thanks,
    Already logged:
    Bug 7652822 - ON DELETE CASCADE IS LOST DURING MIGRATION
    -Turloch

  • Cascade deletes in kodo 3.0.1

    I'm trying to use the cascade delete option and am having problems.
    Here is my jdo file:
    <class name="RoomScene" objectid-class="RoomSceneId">
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="base">
    <extension vendor-name="kodo" key="table"
    value="t_roomscene"/>
    <extension vendor-name="kodo" key="pk-column" value="id_i"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="version-number">
    <extension vendor-name="kodo" key="column"
    value="rowversion_i"/>
    </extension>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="id_i"/>
    </extension>
    </field>
    <field name="itemLinks">
    <collection element-type="ItemLink"/>
    <extension vendor-name="kodo" key="element-delete-action"
    value="cascade"/>
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-many">
    <extension vendor-name="kodo" key="table"
    value="t_mapitemroomscene"/>
    <extension vendor-name="kodo" key="ref-column.id_i"
    value="roomscene_id_i"/>
    </extension>
    </field>
    </class>
    <class name="ItemLink" objectid-class="ItemLinkId">
    <extension vendor-name="kodo" key="jdbc-class-map" value="base">
    <extension vendor-name="kodo" key="table" value="t_mapitemroomscene"/>
    <extension vendor-name="kodo" key="pk-column" value="id_i"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="version-number">
    <extension vendor-name="kodo" key="column" value="rowversion_i"/>
    </extension>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map" value="value">
    <extension vendor-name="kodo" key="column" value="id_i"/>
    </extension>
    </field>
    <field name="item">
    <extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
    <extension vendor-name="kodo" key="column.id_vc" value="item_id_vc"/>
    </extension>
    </field>
    <field name="roomScene">
    <extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
    <extension vendor-name="kodo" key="column.id_i"
    value="roomscene_id_i"/>
    </extension>
    </field>
    <field name="linkText">
    <extension vendor-name="kodo" key="jdbc-field-map" value="value">
    <extension vendor-name="kodo" key="column" value="linktext_vc"/>
    </extension>
    </field>
    </class>
    (each RoomScene has many ItemLinks)
    but when I delete my RoomScene object, I get the following exception:
    "kodo.util.FatalDataStoreException: ERROR: ExecUpdate: Fail to add
    null value in not null attribute roomscene_id_i {prepstmnt 2515391
    UPDATE t_mapitemroomscene SET roomscene_id_i = ? WHERE roomscene_id_i =
    ?} [code=0, state=null]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: ERROR: ExecUpdate: Fail to
    add null value in not null attribute roomscene_id_i {prepstmnt 2515391
    UPDATE t_mapitemroomscene SET roomscene_id_i = ? WHERE roomscene_id_i =
    ?} [code=0, state=null]
    java.sql.SQLException: ERROR: ExecUpdate: Fail to add null value in
    not null attribute roomscene_id_i
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
    at
    kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:510)
    at
    kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl
    ..java:788)
    at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerI
    mpl.java:644)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:
    416)
    at
    net.mastertile.www.room.action.RoomSceneDeleteAction.executeLogic(RoomSc
    eneDeleteAction.java:27)
    my kodo.properties file is like this:
    javax.jdo.PersistenceManagerFactoryClass:
    kodo.jdbc.runtime.JDBCPersistenceManagerFactory
    javax.jdo.option.RetainValues: true
    javax.jdo.option.RestoreValues: true
    javax.jdo.option.Optimistic: true
    javax.jdo.option.NontransactionalWrite: false
    javax.jdo.option.NontransactionalRead: true
    javax.jdo.option.Multithreaded: false
    javax.jdo.option.MsWait: 5000
    javax.jdo.option.MinPool: 1
    javax.jdo.option.MaxPool: 200
    javax.jdo.option.IgnoreCache: true
    javax.jdo.option.ConnectionFactoryName=java:comp/env/jdbc/default
    javax.jdo.option.ConnectionFactory2Name=java:comp/env/jdbc/default
    kodo.LicenseKey=XXXXXXXXXXX
    kodo.jdbc.MappingFactory=metadata
    kodo.DataCache=false
    kodo.RemoteCommitProvider=sjvm
    kodo.FlushBeforeQueries=false
    kodo.jdbc.ForeignKeyConstraints=true
    kodo.jdbc.SequenceFactory: native
    kodo.jdbc.SchemaFactory: dynamic
    We are using postgresql.
    Thanks,
    Nathan

    Were the foreign keys generated in the database? You also may want to
    try using the *-dependent extensions.
    Nathan Voxland wrote:
    I'm trying to use the cascade delete option and am having problems.
    Here is my jdo file:
    <class name="RoomScene" objectid-class="RoomSceneId">
    <extension vendor-name="kodo" key="jdbc-class-map"
    value="base">
    <extension vendor-name="kodo" key="table"
    value="t_roomscene"/>
    <extension vendor-name="kodo" key="pk-column" value="id_i"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="version-number">
    <extension vendor-name="kodo" key="column"
    value="rowversion_i"/>
    </extension>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="value">
    <extension vendor-name="kodo" key="column"
    value="id_i"/>
    </extension>
    </field>
    <field name="itemLinks">
    <collection element-type="ItemLink"/>
    <extension vendor-name="kodo" key="element-delete-action"
    value="cascade"/>
    <extension vendor-name="kodo" key="jdbc-field-map"
    value="one-many">
    <extension vendor-name="kodo" key="table"
    value="t_mapitemroomscene"/>
    <extension vendor-name="kodo" key="ref-column.id_i"
    value="roomscene_id_i"/>
    </extension>
    </field>
    </class>
    <class name="ItemLink" objectid-class="ItemLinkId">
    <extension vendor-name="kodo" key="jdbc-class-map" value="base">
    <extension vendor-name="kodo" key="table" value="t_mapitemroomscene"/>
    <extension vendor-name="kodo" key="pk-column" value="id_i"/>
    </extension>
    <extension vendor-name="kodo" key="jdbc-version-ind"
    value="version-number">
    <extension vendor-name="kodo" key="column" value="rowversion_i"/>
    </extension>
    <field name="id" primary-key="true">
    <extension vendor-name="kodo" key="jdbc-field-map" value="value">
    <extension vendor-name="kodo" key="column" value="id_i"/>
    </extension>
    </field>
    <field name="item">
    <extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
    <extension vendor-name="kodo" key="column.id_vc" value="item_id_vc"/>
    </extension>
    </field>
    <field name="roomScene">
    <extension vendor-name="kodo" key="jdbc-field-map" value="one-one">
    <extension vendor-name="kodo" key="column.id_i"
    value="roomscene_id_i"/>
    </extension>
    </field>
    <field name="linkText">
    <extension vendor-name="kodo" key="jdbc-field-map" value="value">
    <extension vendor-name="kodo" key="column" value="linktext_vc"/>
    </extension>
    </field>
    </class>
    (each RoomScene has many ItemLinks)
    but when I delete my RoomScene object, I get the following exception:
    "kodo.util.FatalDataStoreException: ERROR: ExecUpdate: Fail to add
    null value in not null attribute roomscene_id_i {prepstmnt 2515391
    UPDATE t_mapitemroomscene SET roomscene_id_i = ? WHERE roomscene_id_i =
    ?} [code=0, state=null]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: ERROR: ExecUpdate: Fail to
    add null value in not null attribute roomscene_id_i {prepstmnt 2515391
    UPDATE t_mapitemroomscene SET roomscene_id_i = ? WHERE roomscene_id_i =
    ?} [code=0, state=null]
    java.sql.SQLException: ERROR: ExecUpdate: Fail to add null value in
    not null attribute roomscene_id_i
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
    at
    kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
    at
    kodo.jdbc.runtime.JDBCStoreManager.flush(JDBCStoreManager.java:510)
    at
    kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl
    .java:788)
    at
    kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerI
    mpl.java:644)
    at
    kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
    at
    kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:
    416)
    at
    net.mastertile.www.room.action.RoomSceneDeleteAction.executeLogic(RoomSc
    eneDeleteAction.java:27)
    my kodo.properties file is like this:
    javax.jdo.PersistenceManagerFactoryClass:
    kodo.jdbc.runtime.JDBCPersistenceManagerFactory
    javax.jdo.option.RetainValues: true
    javax.jdo.option.RestoreValues: true
    javax.jdo.option.Optimistic: true
    javax.jdo.option.NontransactionalWrite: false
    javax.jdo.option.NontransactionalRead: true
    javax.jdo.option.Multithreaded: false
    javax.jdo.option.MsWait: 5000
    javax.jdo.option.MinPool: 1
    javax.jdo.option.MaxPool: 200
    javax.jdo.option.IgnoreCache: true
    javax.jdo.option.ConnectionFactoryName=java:comp/env/jdbc/default
    javax.jdo.option.ConnectionFactory2Name=java:comp/env/jdbc/default
    kodo.LicenseKey=XXXXXXXXXXX
    kodo.jdbc.MappingFactory=metadata
    kodo.DataCache=false
    kodo.RemoteCommitProvider=sjvm
    kodo.FlushBeforeQueries=false
    kodo.jdbc.ForeignKeyConstraints=true
    kodo.jdbc.SequenceFactory: native
    kodo.jdbc.SchemaFactory: dynamic
    We are using postgresql.
    Thanks,
    Nathan
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

Maybe you are looking for