How to change delete order?

Hello,
I have classes C, C1, C2. C has private owned 1-N mapping to C1 and private owned 1-N mapping to C2. C1 has 1-1 mapping to C2.
Assume c has c1 and c2, c1 has c2. When I save c, TopLink inserts c, then c2, then c1. Now I remove c1 and c2 from c (from private owned collections) and save c. TopLink tries to delete from database c2 first - I get
"integrity constraint violated - child record found".
Of course it is found - I would like TopLink to remove c1 first, then c2. Why are DELETE statements executed in the same order like INSERT statements? How can I change that order?
Thanks

I'd like to share one possible workaround. It seems that the order of delete operations depends on the order of mappings in descriptor (attributes seems to be sorted alphabetically in project XML generated in TopLink workbench). So I did something like this (in afterLoad method) to ensure the correct order of DELETE operations.
DatabaseMapping mapping1 = pDescriptor.getMappingForAttributeName("att1");
DatabaseMapping mapping2 = pDescriptor.getMappingForAttributeName("att2");
DatabaseMapping mapping3 = pDescriptor.getMappingForAttributeName("att3");
DatabaseMapping mapping4 = pDescriptor.getMappingForAttributeName("att4");
if (mapping1 != null) {
pDescriptor.removeMappingForAttributeName("att1");
pDescriptor.addMapping(mapping1);
if (mapping2 != null) {
pDescriptor.removeMappingForAttributeName("att2");
pDescriptor.addMapping(mapping2);
if (mapping3 != null) {
pDescriptor.removeMappingForAttributeName("att3");
pDescriptor.addMapping(mapping3);
if (mapping4 != null) {
pDescriptor.removeMappingForAttributeName("att4");
pDescriptor.addMapping(mapping4);
}

Similar Messages

  • How to change the order of albums iOS 8?

    I recently upgraded from an iPhone 5 to a 6 Plus. Everything is fine except for the fact that some of my music is in the wrong order. There are some groups that released multiple albums in the same year, and I would like them to be in the order of when they were released. On my 5 I was able to put them in the right order by going on a computer, changing the sorting, then update iTunes Match to have it change on my phone as well. (example; group came out with album "1" and "2" same year and it defaults to "2" first, then "1." I was able to change it on the iPhone 5 to be in the right order by changing how they are sorted from my computer but that doesn't work on the 6 Plus.) I would like to order it where it goes top to bottom, with the newest on top going down. How would I do this?
    Thanks

    Hi Jason,
    How to change the order of tables within sheets
    Make a table active by clicking in it once to select that table, then drag it by the 'bullseye' (top left, I have placed a red circle to show the bullseye):
    After dragging the table down:
    Table 1 is now below Table 2.
    The blue line is an Alignment Guide
    Two types of Guide:
    1. Menu > View >Show Rulers. Drag Alignment Guides from a ruler to where you want them.
    2. Menu > Numbers > Preferences > Rulers > Alignment Guides. Turn on (tick) both guides. That allows you to align objects with *each other* (as well as with the ruler guides). These guides help to align objects left, middle, right, top, bottom.
    Alignment Guides do not show unless you are moving an object.
    to drag/move table to another sheet in the one file
    Not possible in Numbers 3. The Sheets Pane has gone. Instead, select the entire table (click once in the table to make it active, then click on the bullseye). Copy (or Cut if you are brave). Go to another Sheet and Paste.
    Also can you change the size of sheet tab width on tab toolbar, so I can see more sheets at once??
    No. Let's hope this will be added in future updates. However, you can drag a Sheet tab left or right to reorder them.
    Another tip: each Sheet tab shows the contents of that Sheet, with some options such as Duplicate and Delete:
    Regards,
    Ian.

  • How to change to order of sorter

    If I use Move up/down column
    the list page will order by ascending by the sort field, that mean the latest data will be in the last page, therefore I want to change the order
    I found some code seems related to the sort function
    $tso_listdrama_ship_main1 = new TSO_TableSorter("rsdrama_ship_main1", "tso_listdrama_ship_main1");
    $tso_listdrama_ship_main1->addColumn("drama_ship_main.sm_sort DESC"); // Order column
    $tso_listdrama_ship_main1->setDefault("drama_ship_main.sm_sort DESC");
    $tso_listdrama_ship_main1->Execute();
    // Defining List Recordset variable
    $NXTSort_rsdrama_ship_main1 = "drama_ship_main.sm_sort DESC";
    if (isset($_SESSION['sorter_tso_listdrama_ship_main1'])) {
      $NXTSort_rsdrama_ship_main1 = $_SESSION['sorter_tso_listdrama_ship_main1'];
    I add DESC after all the sort field, but it's not work.

    Hi Jason,
    How to change the order of tables within sheets
    Make a table active by clicking in it once to select that table, then drag it by the 'bullseye' (top left, I have placed a red circle to show the bullseye):
    After dragging the table down:
    Table 1 is now below Table 2.
    The blue line is an Alignment Guide
    Two types of Guide:
    1. Menu > View >Show Rulers. Drag Alignment Guides from a ruler to where you want them.
    2. Menu > Numbers > Preferences > Rulers > Alignment Guides. Turn on (tick) both guides. That allows you to align objects with *each other* (as well as with the ruler guides). These guides help to align objects left, middle, right, top, bottom.
    Alignment Guides do not show unless you are moving an object.
    to drag/move table to another sheet in the one file
    Not possible in Numbers 3. The Sheets Pane has gone. Instead, select the entire table (click once in the table to make it active, then click on the bullseye). Copy (or Cut if you are brave). Go to another Sheet and Paste.
    Also can you change the size of sheet tab width on tab toolbar, so I can see more sheets at once??
    No. Let's hope this will be added in future updates. However, you can drag a Sheet tab left or right to reorder them.
    Another tip: each Sheet tab shows the contents of that Sheet, with some options such as Duplicate and Delete:
    Regards,
    Ian.

  • How to change purchase order's cost center in batch

    Dear all :
    how to change purchase order's cost center in batch?

    Dear Manish :
    thanks so much for you reply.
    the filed which i wanted to change it's content is cost center (KOSTL) in table EKKN.
    i couldn't find it in this t-code when i select fields.

  • How to change the order of download options as per our convience in obiee

    hi frineds,
    How can i change the order of the download options in obiee dashboard ?
    like if you press download option you see
    download to excel
    download to excel 2000
    download data
    download webpage(mhtml)
    how to change this order.????????

    The download options are setup in OracleBI\web\msgdb\messages\viewscontrolmessages.xml
    - Search for the tag *<WebMessage name="kmsgEVCDownloadLinks">* that contains the download links within the hyperlink tag
    - Each hyperlink tag is a download option
    - Reorder as you require
    - The actual text that gets displayed as a link can also be customized by editing the entry for a message such as kmsgEVCLinkDownloadExcel in the OracleBI\web\msgdb\l_en\messages\viewmessages.xml [the customization is locale specific]
    - Restart the presentation server

  • How to change page order in Acrobat Porfolio?

    How to change page order in Acrobat Porfolio? In older versions it use to be much easier to drag and drop the page order. I don't see any menu options on arranging the pag order. Any ideas? Thanks.
    I would post a screenshot but they have been disabled on these forums.

    You should ask in the Reader forum. But my guess is that Reader there is nothing you can do. Acrobat allows you to move pages around, but not Reader.

  • How to change display order

    All,
    I had created a Line chart graph with three measures (Total Employees, Total Promotion and Total Hires) for last 12 months. Chart legend is displaying this order, Total Employees, Total Promotions and Total Hires. But my requirement is , Legend supposed to be display this order, Total Hires, Total Employees and Total Promotions. How to change this order in Graph?

    Hi
    Pull up a Column and click in the fx and there write the below formula
    Case when column Type ="Total Hire' then '1'
    when column Type = 'Total Employee' then '2'
    when column Type ='Total Promotion' then '3'
    else null end
    Then sort the column in asc order and then hide the column
    You will find that the original measure column is sorted as required
    Regards
    Debo
    Edited by: Debo Roy on Sep 8, 2010 8:03 PM
    Edited by: Debo Roy on Sep 8, 2010 8:21 PM

  • How to change the order of users in appearance of login screen?

    Hello!
    Because we often switch to a user,
    which is listed last in login screen,
    we want move them to the second place.
    How to change the order of users in appearance of login screen?
    Thank you for a tip
    Erhy

    The order users show up on the login screen is the way they are ordered under the
    C:/Users directory. This is usually alphabetical, AFAIK there is no other way to change the order other than to change the username to something that starts with a letter that will be higher alphabetically.

  • How to change the order of the fields in the queryoutputnode in OVS.

    How to change the order of the fields in the queryoutputnode in OVS.

    The actual requirment is to re-arrange the elements of the queryoutput node, to look more organised
    say for ex.
    Seq 1:
    c code                            company name                          g/l ac                g/l ac description  
    Seq2 :
    g/l ac description             c code                                       g/l ac                company name  
    Seq 1 way of representation is more organised that Seq2. How can we achieve this re-arranging of ordering in the queryoutputnode.

  • Sb CS4 multi-track file how to change track order

    I can't figure out how to change the order of the tracks in my multi-track file. Can anybody advise? Thanks.

    Thanks for checking. BTW are you using CS4 or CS5? I wonder if that has been added in the new version. I might install the trial version to see.

  • How to change the order of entries on the podcast or blog pages?

    Hi,
    I tried to move entries in the entry area on the podcast page to change the existing order but it seems they stay in the way they were created. Is there any opportunity to change the order of entries after they were created?
    Thank you,
    Vlad

    I'm having the same problem. How do I do this? I just
    hit delete entries. So the blog doesn't show up on
    iWeb, but it shows up on my website.
    This is NOT the same problem.
    Clear your browser cache.

  • How to Change the order or location of pages within Chapters

    I am using the iBook Author very often. Right now I'm confronted with the problem, that I want to change the sequence of Pages WITHIN Chapters.
    Furthemore, and even a greater problem, when writing books, it can happen, that you have to change the sequence a bit.
    Let's say you have a book with 10 Chapters and decide afterwards, to take 2 Chapters to be part of new Section (which is in new Chapter).
    So the questions are:
    1) how can I re-order Pages within Chapters
    2) how can I re-order Pages into other Chapters
    3) how can I move Pages from one Chapter into a new Section
    ... hope someone has the solution

    >Furthemore, and even a greater problem, when writing books, it can happen, that you have to change the sequence a bit.
    I'd like to caution your that such non-liner editing can be a quick way to corrupt a book, so try to resist doing that as much as possible.
    So the questions are:
    1) how can I re-order Pages within Chapters
    2) how can I re-order Pages into other Chapters
    3) how can I move Pages from one Chapter into a new Section
    You can only copy/paste content from one page's content into another in those examples, either by replacing existing content, or by inserting a blank page in the new target location and then deleting the source page when done.

  • How to change the order of Mail accounts

    Is there a way I can adjust the order of how my Mail accounts appear? I have six accounts on my iPhone, but generally only receive e-mails to two of them, so I'd like to put them at the top of the list.
    Thanks!

    You're welcome.
    I'm not sure how the account order is established on the iPhone when transferring email accounts from your computer to your iPhone via the iTunes sync process. I access only two email accounts and I manually created both on my iPhone.
    You can delete all accounts on your iPhone, and then select only one email account at a time under the Info tab for your iPhone sync preferences followed by a sync - selecting the account you want listed first. Follow this by deselecting the account under the Info tab for your iPhone sync preferences and then select the next account that you want listed on your iPhone followed by a sync.
    Repeat the same for the 3rd account, 4th account, and so forth.
    Another thing to check, what order are the email accounts listed under the Info tab for your iPhone sync preferences? Does the order match the order of the accounts on your iPhone? If so, can you change the order of the accounts under the Info tab for your iPhone sync preferences? If yes, you can delete all email accounts from your iPhone followed by transferring all 6 email accounts at one via the iTunes sync process.

  • How to change effects order?

    I cannot seem to change the order of the effects in the effects rack.
    I must say I feel rather stupid because of this.
    How does one do this?
    (CS3 master collection, WinVista)
    thank you for your time
    - j

    i use the mouse scroll zoom a lot. scroll zooming is always a great plus. it's just that when i want to scroll the waveform display my pointer never is near the top (maybe it is a habit of mine). it's a bit like the layout for after effects or premiere. all the interactive bits are on the bottom of the screen. anyway, that's why i think middle mouse button scrolling might come in handy.
    by "displaying the bitrate and frequency of the current sample" i mean: is the current audio file i'm editing 16bit, stereo, 44kHz? or 24bit 48kHz? when i open a mp3-file which was encoded in 8bit 22kHz and i save it in 16bit 48kHz .wav-format i have no real clue if it has to convert while saving or not. in other words i have no easy way to know if Sb has to do another conversion just to save or not.
    all this was meant for the file in general.
    for a specific selected sample in that file i would be handy to display the selected length (in samples, frames or seconds)
    also, when i delete cache files in the 'preferences' menu, a small confirmation message to tell me that indeed something has happened would be handy.
    i'm just typing what i encounter. just my 2 cents :)
    cheers!

  • How to change Service order quantity using BAPI/FM

    Hi All,
    Can any body tell me how to change the Service Order quantity (in IW32) using a FM or a BAPI.
    I tried using the BAPI: BAPI_ALM_ORDER_MAINTAIN but I am unable to change the quantity. May be I might be missing some parameter. If anybody has done this please let me know the parameters that needs to be passed or if there is any other way out.
    Points will be rewarded to useful answers!!
    Thanks,
    Susanth.

    Hi!
    I have used this BAPI.read the documentation properly and after calling this bapi call BAPI_TRANSACTION_COMMIT then only expected results com n get saved.
    for ex:
    call function 'BAPI_ALM_ORDER_MAINTAIN'
        tables
          it_methods              = itab_methods
          it_header               = itab_header
      IT_HEADER_UP            =
          it_header_srv           = itab_header_srv
      IT_HEADER_SRV_UP        =
          it_userstatus           = itab_userstatus
          it_partner              = itab_partner
      IT_PARTNER_UP           =
          it_operation            = itab_operation
      IT_OPERATION_UP         =
          it_relation             = itab_relation
      IT_RELATION_UP          =
          it_component            = itab_component
      IT_COMPONENT_UP         =
          it_objectlist           = itab_objectlist
      IT_OBJECTLIST_UP        =
          it_olist_relation       = itab_olist_relation
          it_text                 = itab_text
          it_text_lines           = it_text_lines
          it_srule                = itab_srule
      IT_SRULE_UP             =
          it_tasklists            = itab_tasklists
          extension_in            = itab_extension_in
          return                  = itab_return
          et_numbers              = itab_et_numbers
      call function 'BAPI_TRANSACTION_COMMIT'
       exporting
         wait          = 'X'
    IMPORTING
      RETURN        =
    reward points if helpful.

Maybe you are looking for

  • 7.1 Update problem

    I have hit a strange problem that I would appreciate some assistance with. Background: Airport Extreme "N" was working well on 7.0 (i.e. surf web, USB drives connected, NAT enabled etc..) Day before yesterday I attempted to do an upgrade to 7.1 and r

  • Segment field mandatory in PCTR master

    Hi I created PCTR without assigning segment to that PCTR. To avoid this error in future, i want to make this field as mandatory. Can i make segment field as mandatory

  • Will the XSATA device for Xbox 360 work w/ Tiger?

    There is a device that allows transfers via USB 2.0 between the Xbox 360 and a PC called XSATA. I'm wondering if it will work with my iMac G5 running Tiger. Anyone? iMac G5 1.8GHz 160 GB   Mac OS X (10.4.1)  

  • Web Services - RFC

    Hi Guys, I have to work and configure the scenario from Websrvices to SAP. Can anyone let me know the process and steps to setup / Configure the scenario for  Web services --> RFC. Thanks a lot in Advance. Regards, Kittu.

  • Encore CS4 asks if "Adobe can make changes to my system" before it will open

    Because it now needs intervention from me, I can no longer use Dynamic Link from Premiere to Encore, because the system will stall there. I uninstalled Encore, and reinstalled. No change I uninstalled Production Premium Suite, and reinstalled. No cha