New object can not update existed child object

I have three classes, they are DraftOrder, Order and SaleItem,
public class DraftOrder{
private List<SaleItem> saleItems; // not check private owned
public class Order{
private List<SaleItem> saleItems; // check private owned
public class SaleItem{
private ValueHolderInterface draftOrder;
private ValueHolderInterface order;
Now, I have one DraftOrder instance, I modify it from UI, and save it as Order, I want to the toplink to do following steps,
1, insert Order data into db
2, update SaleItem into DraftOrder to Order, don't excute delete and insert, only update
3, delete DraftOrder
In my Java code, i have moved the SaleItems to Order,
but toplink dont update the SaleItem,
who can help on it?
thanks in advance.

Hello,
It looks like you have a 1:M from DraftOrder to SaleItem and another 1:M from Order to SaleItem, where SaleItem has a 1:1 backpointer to both. When you set the DraftOrder->SaleItem relationship, you must also be maintaining the SaleItem -> DraftOrder backpointer or the foreign key in the SaleItem table would not be set. When you remove the DraftOrder->SaleItem relations, you must also remove the SaleItem -> DraftOrder relations or again, you will not see the foreign key in SaleItem get set to null. TopLink does not perform relationship maintenance for you by default.
It is the SaleItem -> Order and the SaleItem -> DraftOrder relationship that controls the foreign key in SaleItem's table - you must set these relationships or you will not see the foreign keys be updated. The 1:m is more like a readonly relation that reflects what the 1:1 relationship holds.
Best Regards,
Chris

Similar Messages

  • Question for delta loading, why can not update existing record in cube

    Hi, Gurus,
    I load data from a flat file into one infocube with delta loading option, and in the related datasource, i chose 'additive delta' option.
    However after delta initial and delta update, when I checked cube content, I found that there are 2 records with the same characteristic value (just like duplicated key), and my expectation is to sum key figure with the same characteristic. Who can help me on that?
    BTW: when I check delta queue, why there is not any queue?

    Hi,
    In uploading of flat file , If you are able to capture the changes to the previously loaded records, Then you can follow the additve delta. So it decreases the time of uploading .Only changed or new records will be uploaded every time.
    If you are not able capture the changes in flat file ,Every time you have to do full upload ,Before this delete the contents of Infocube. (Assuming there is no ODS B/W Infocube and Flat file).
    With rgds,
    Anil Kumar Sharma. P

  • PARTY. CAN NOT UPDATE UNVERSIONABLE OBJECT IN A VALIDATED CONFIGURATION.

    Hi B2B gurus,
    While validating our host trading partner, I am getting below error. Could you please help me in resolving this issue. Please do the needful.
    We are using two versions of EDI
    4010(5.0) and 5020(1.0) versions
    An error occurred during validation.
    Error -: AIP-11052: Writing following objects: Trading Partner failed due to following constraint violation: PARTY. CAN NOT UPDATE UNVERSIONABLE OBJECT IN A VALIDATED CONFIGURATION.
    Regards
    Srinivas

    Hi Srinivas,
    Make sure there is no agreement in deployed state. Retire and purge all existing configurations and make sure there is no agreement in validated state.
    Regards,
    Anuj

  • TS2446 i can sign in apple ID but can not update app store and add new app

    i can not update my app store and add new app

    That didn't answer either of my questions.
    What are you trying to sign into using Safari?
    Did you change the email on your existing Apple ID or create a new Apple ID?
    What "app button" are you talking about?

  • My iphone4s can not update any apps. Nor is it able to download any new apps. What should I do?

    my iphone4s can not update any apps. Nor is it able to download any new apps. What should I do?
    I have two Apple Accounts. One in Switzerland and one in China. I used to be able to updates all of my apps by clicking individual apps. One day I clicked update all by accident. Ever since that, my iphone cannot update any of the apps. Nor is it able to download any new apps. Please kindly let me know how to make the phone back into work with the apps.
    Many thanks.

    I find it difficult to believe that it took you a year to realize your phone was defective.
    Restore the phone as new. Wait a couple of days before adding any apps to see if it's running ok. Then, add apps a couple at a time so that, if any of them cause issues, you'll have an idea which one.

  • Problem I can not Update new Nokia X6 8Gb firmware...

    Problem I can not Update new Nokia X6 firmware Version V.21.0.005,
     can someone tell me where can I get new Nokia Software Update for X6 8Gb,
     I tried to update new firmware, but this is new version is not Aviable 
    where I can get new version in my phone serial number: numbers end
     in ( 2587 ) and when will update available for my phone serial number be
    Thank you 

    Reasons why a phone cannot update:
    1. It is a country variant - country variants often get the updates later, or have updates skipped altogether. A Turkish country variant product code for example, skipped v40 and updated from v31 straight to v50.
    2. It is network branded - phones acquired from network providers or these providers' stores SIM free are branded, and will not get updates until the networks approve and modify the updates to their liking.
    3. Special editions - These special editions are chartered editions and may never get updates unless taken to a Nokia Care center.
    If you find my post helpful please click the green star on the left under the avatar. Thanks.

  • HT5460 I can  not update to the new OS X Mountain Lion. Whenever I do I get a message an error has occurred, timed out 102.W

    I can not update to the new OS x Mountain Lion.  I get an error that  says it has timed out then "102".   WHy can't I get it update??
    Thanks for your help.

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, by a peripheral device, or by corruption of certain system caches. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode and log in to the account with the problem. Note: If FileVault is enabled on some models, or if a firmware password is set, or if the boot volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to boot and run than normal, and some things won’t work at all, including sound output and  Wi-Fi on certain models. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • I downloaded the new version of iTunes 11.0.3 and now I get this error when I go to update Apps...any solutions????  You can not update this software since you have not owned the major version of this software.

    You can not update this software since you have not owned the major version of this software.
    any soultions???

    Same here. Just becoming a nightmare. Updated iTunes and now can't update apps it itself is showing as available updates. Count me in on the latest "You can not update this software since you have not owned the major version of this software." bug.
    Next I have to post about a new problem in iPhoto on a new thread.... it lost the "link" between some but not all photos I have in the library and what it itself posted to FaceBook a few hours ago...
    Incredibly frustrating.
    Imran

  • HT4484 i used to have an app store and lost it and i created a new one and i can not update the iphoto app because it was updated with the old account, is there a solution for this problem?

    i used to have an app store and lost it and i created a new one and i can not update the iphoto app on my macbook pro because it was updated with the old account, is there a solution for this problem?

    Content and Apple IDs -
    Content is forever tied to the Apple ID that bought it. Apple does not transfer content from one Apple ID to another. Apple does not merge Apple IDs. You will never be able to access your content bought with one Apple ID with a new Apple ID.

  • When i want to download the new version of iPhoto, i get this message : You can not update this software since you do not have the main version. What should i do ?

    HI,
    I got this problem : when i want to download the new version of iPhoto, i get this message : You can not update this software since you do not have the main version. What should i do ?
    IPhoto was already on my MacBook Pro when i bought it.
    Thank you for your help
    Thierry

    Welcome to Apple Support Communities
    Open App Store > Purchases, and see if iPhoto app is listed. If not, unhide it > http://support.apple.com/kb/HT4928 Apart from that, check that iPhoto is in Applications folder. If not, put it in this folder.
    If nothing works, remove iPhoto, open App Store > Purchases, and install iPhoto free of charge

  • Help can not update my CS5 on the new PC

    Help can not update my CS5 on the new PC

    I don't know whether you are running Windows or Mac OS, so I will link you to the  Product updates page.
    Look under Photoshop, choose your OS and look under CS5 for the 12.0.4 Multilingual Update (MUL).  You simply download and install.
    Adobe Camera Raw 6.7 is the latest and you download and install that.
    Under Product updates look for Bridge and apply all updates.
    CS5 is quite old and the updater doesn't work as it should so you have do the updates manually.

  • After the update the new version can not determine downloads folder. In the eyes determine folder, however downlload files go in C / documets and settings even

    After the update the new version can not determine downloads folder. In the eyes determine folder, however downlload files go in C / documets and settings even though I chose a different folder

    hello, there's a general regression in firefox 27 that won't allow files to download directly into a root drive. please try to create a subfolder (like ''D:\Downloads'') and set this as default location for downloads...
    also see [https://bugzilla.mozilla.org/show_bug.cgi?id=958899 bug #958899].

  • HT201210 I had problem my the new ipad that show notify to update but can not update that update page show blank page

    I had problem my the new ipad that show notify to update but can not update that update page show blank page

    Try updating from here:
    App Store>Purchased>Select All
    Note: You'll have to look out for apps with the "Update"

  • I can not update my version of itunes. When I install the message "Could not open key UNKNOW \ Instaler \ Products \ E84E5F4E55179FC488DCF773E79CCA45 \ SourceList \ Media. Make sure you have sufficient access to that key or contact the support team." Any

    I can not update my version of itunes. When I install the message "Could not open key UNKNOW \ Instaler \ Products \ E84E5F4E55179FC488DCF773E79CCA45 \ SourceList \ Media. Make sure you have sufficient access to that key or contact the support team." Any tips on how to solve this problem?

    If doesn't work try use the instructions below BUT in BOTH folders, first in SourceList and after in the Media.
    Start>Run put regedit and press Ok.
    1. Go to the key: HKEY_CLASSES_ROOT\Installer\Products\9B00314CD581E574FBCE93FE37F2911B\SourceLis t\Media
    2. Right click in Media folder, select Permissions from the menu.
    3. You will see that is no user, on the "Permissions for..." dialog box which appears next, press the "Add.." button and add in the "All"
    4. Back on the first "Permissions for..." dialog box, click on each account in the top-list and make sure each has the "Full Control = Allow" and "Read = Allow" permissions
    5. Click the "Advanced" button and the "Advanced Security Settings" dialog box appears
    6. On the "Permissions tab" enable the checkmark box named "Replace all child object permissions with inheritable permissions from this object", then press the "Apply" button
    7. On the "Owner" tab, highlight the "Administrators" name in the lower listbox, enable the checkmark box called "Replace owner on subcontainers and objects" and press the "Apply Button"

  • 10.6.8 Server. New Users can not authenticate

    We have two Xserves (one OD Master, one replica) running OS X 10.6.8 Server and about 100 client macs all running 10.6.8.
    We have a problem when adding new users in WorkGroup Manager. Users seem to be added correctly (no errors), and all info matches existing/previous users in WGM (including Kerberos and apple password entries). New users can not log into their Macs, nor authenticate to mount any volumes that also authenticate through our Master OD server. What's odd is that we can edit passwords, etc in existing/previous users and they are updated on the client end. We have also verified logs and compared new users authentication logs to existing and the logs say that the users authenticate successfully.
    We are at a loss as what to do next. Any ideas?

    We have two Xserves (one OD Master, one replica) running OS X 10.6.8 Server and about 100 client macs all running 10.6.8.
    We have a problem when adding new users in WorkGroup Manager. Users seem to be added correctly (no errors), and all info matches existing/previous users in WGM (including Kerberos and apple password entries). New users can not log into their Macs, nor authenticate to mount any volumes that also authenticate through our Master OD server. What's odd is that we can edit passwords, etc in existing/previous users and they are updated on the client end. We have also verified logs and compared new users authentication logs to existing and the logs say that the users authenticate successfully.
    We are at a loss as what to do next. Any ideas?

Maybe you are looking for

  • I have windows 7 and use google chrome and I can't download iTunes.  It just says it cannot be verified and won't let it run.

    I am unable to download iTunes to my computer.  It uses a genuine edition of Windows 7 and I use Google Chrome but once it has downloaded and I click to run it comes up with 'package cannot be verified'.  I also tried to download through Internet Exp

  • ERROR in configuration:more elements in file csv structure than filed names

    <p ct="TextView" class="urTxtStd" style="white-space:nowrap;">Hello,<br>we have problem with file content conversion on file (FTP) sender<br>adapter when reading flat delimited file.<br><br>Error:<br>Conversion of file content to XML failed at positi

  • Elements 5 - Organizer will not show thumbnails

    Recently moved Elements 5 to my new laptop - On the laptop the organizer will not show photos in any view other than single picture.  Anything smaller shows the hour glass [also shows on the collections icons].  I deleated the first catalog transfer

  • Delete InfoCube

    Hi, I get this message when i tried to delete Cube "Operation ' Change Attribute TSTATE ' could not be carried out for Request 2760" Regards, NPR

  • Problems Playing a TV show

    Has anybody using Windows had trouble playing a show they downloaded? I bought last Sunday's episode of Desperate Housewives, but it didn't show up in my library until I manually found it and dragged it there. When I try to play it I can't see or hea