One-to-many mapping and update the many part

Hello !
Here's my problem,
I've got an object A having a vector of object B.
The mapping in toplink is one-to-many with the back-references set in B.
Insertion : no problem.
Now i would like to change the Vector of B (inserting new B, updating existing B) in a function with the Vector vC (modified vector of B).
What is the best way to do this ?
I tried many thing but either I have toplink 6004 error, or doing it by removing all elements of the Vector (deleting all B in database), and then setting A with C (recreating all object in the modified Vector).
Another way to explain my case:
how to do this in UnitOfWork ?
function modifyAVectorOfB(A, vectorOfC)
AClone = uow.registerObject(A);
Aclone.setVectorOfB(vectorOfC);
uow.commit;
(and in database all existing object in C are updated, new object in C are created, removed object in C are deleted)

Have found a solution, read all object in the modified Vector, read the modified object in the Unit Of Work with readObject(B) (So i get the database or cache version) and then comparing it with the modified to change what is needed to be change.

Similar Messages

  • How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

    How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

    How can I filter to find photos NOT pinned to a map? I have 28,000 phots with many mapped and many not. The Search function does not include GPS data. I haven't found  way to search metadata inside or out of Elements.

  • Getting "the procedure entry point CGImageRelease could not be located in the dynamic link library CoreGraphics.dll" error when starting Itunes. Haved reloaded many times and still the error.

    Getting "the procedure entry point CGImageRelease could not be located in the dynamic link library CoreGraphics.dll" error when starting Itunes. Haved reloaded many times and still the error.

    Taken at face value, you're having trouble with an Apple Application Support program file there. (Apple Application Support is where single copies of program files used by multiple different Apple programs are kept.)
    Let's try something relatively simple first. Restart the PC. Now head into your Uninstall a program control panel, select "Apple Application Support" and then click "Repair".
    Does iTunes launch properly now?
    If no joy after that, try the more rigorous uninstall/reinstall procedure from the following post:
    Re: I recently updated to vista service pack 2 and I updated to itunes

  • HT1350 my kids entered the wrong unlock code on my ipod too many times and now the screen says ipod disabled connect to itunes. Well i try connecting to itunes and i cant because my ipod is locked! need help please!

    my kids enetered the wrong unlock code on my ipod touch too many times and now the screen says IPOD DISABLED connect to itunes. I have tried connecting it to itunes and I cant because the ipod is locked. need help please! any ideas? Thanks, Nick

    Place the iOS device in Recovery Mode and then connect to your computer and restore via iTunes. The iPod will be erased.
    iOS: Wrong passcode results in red disabled screen                          
    If recovery mode does not work try DFU mode.                         
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings

  • Suppose I have two identical laptops loaded with my current time machine back up. I take one on a trip and update it with time machine but leave it. I come back w time machine HD and connect the home laptop, will it just update or start over from scratch?

    Suppose I have two identical laptops loaded with my current time machine back up. I take one on a trip and update it with time machine but leave it behind. I come back with the time machine HD and connect it to the home laptop, will it just update or start over from scratch? is there a way to make it just update it?

    You might have better luck using a clone.
    Clone  - Carbon Copy Cloner          (Often recommended as it has more features than some others)
    Clone – Data Backup
    Clone – Deja Vu
    Clone  - SuperDuper
    Clone - Synk
    Clone Software – 6 Applications Tested
    Commonly Used Backup Methods

  • Approach for holding the same message and updating the table field Status

    Hi,
    I have a scenario a (first) proxy asynchronous to JDBC synchronous and then(second) proxy asynchronous.
    my first proxy calls sends records (which has a status entry " in process" ) to JDBC it updates or inserts.
    JDBC sends a response (may be a count of records updated or inserted)
    now i need to handle some how to get the records which have been inserted or updated, so that i can map and change the table entry  status field" in process" to " active".
    Can i handle this without stored procedures.If so how
    Can it be done through BPM  where i retain inital mapping or any other solution. please  help.

    Hi Robin,
    Ok (but that would be the apt method)
    Some other approaches :
    1. Make a async scenario (Proxy to DB), which will update or insert records. Write a trigger in DB which will fetch updated/inserted records and send it to XI. Then you update them in R/3 (via proxy). So you will have two async interfaces (one is Proxy to DB and other one DB to Proxy)
    2. go for BPM. Receive (from proxy), transform sync send, transform send (to proxy) . I will not prefer this as it will be a performance hinderance.
    Regards
    Suraj

  • My new 8th gen iPod nano is 'not recognized' by my computer. My computer runs on Windows 7, and I've installed and updated the latest versions of itunes etc, but still to no avail! I've tried different usb ports, troubleshooting...

    My computer runs on Windows 7, and I've installed and updated the latest versions of itunes etc, but still to no avail! I've tried different usb ports, troubleshooting, etc... But it still says "One of the USB decuces arrached to this omputer has malfunctioned and windows does not recognize it".
    The iPod is brand new, sent to me by Apple as part of the 1st gen replacement programme. I've been using the cable that came with the 1st gen iPod (I bought the first gen second hand) It always worked on my computer with the 1st gen iPod. So I was wondering, do you think I need to replace my cable in order for my PC to recognize my iPod or is it something else?
    Thanks

    Try a different cable. And are you connecting directly to your computer or through a USB hub?

  • HT5548 I upgraded one of my programs and now the old and new both appear on launch pad, and I can't delete the old one.  Is there a way I can do that?

    I upgraded one of my programs and now the icons for both old and new appear on the launch pad.  I don't need or want the old version to display, as it's been imported into the new one.  I can't seem to figure out how to edit it off the launch pad.

    Hi there,
    More then likely, the old version was installed independently from the App Store. The article below goes over the process for removing these application.
    OS X Lion: Install, update, and uninstall apps
    http://support.apple.com/kb/ph4524
    To uninstall other apps, drag the app to the Trash (the Trash is located at the end of the Dock), and then choose Finder > Empty Trash.If you change your mind, before emptying the Trash, select the app in the Trash, and then choose File > Put Back.Warning: When you empty the Trash, the app is permanently removed from your computer. If you have any files that you created with the app, you may not be able to open them.
    Hope that helps,
    Griff W.

  • How can i calculate the percentages and update the progressBar in the splash screen form ?

    I created a splash screen form:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using System.IO;
    using System.Threading;
    namespace GetHardwareInfo
    public partial class SplashScreen : Form
    public SplashScreen()
    InitializeComponent();
    private Mutex mutex = new Mutex();
    public void SyncedClose()
    mutex.WaitOne();
    this.Close();
    mutex.ReleaseMutex();
    public void UpdateProgressBar(int percentage)
    if (this.InvokeRequired)
    mutex.WaitOne();
    if (!IsDisposed)
    this.BeginInvoke(new Action<int>(UpdateProgresPRV), percentage);
    mutex.ReleaseMutex();
    else
    UpdateProgresPRV(percentage);
    private void UpdateProgresPRV(int per)
    if (progressBar1.IsDisposed) return;
    progressBar1.Value = per;
    private void SplashScreen_Load(object sender, EventArgs e)
    The SplashScreen form have in the designer image and on the image a progressBar1.
    Then in form1 i did in the top:
    List<string> WmiClassesKeys = new List<string>();
    IEnumerable<Control> controls;
    string comboBoxesNames;
    SplashScreen splash = new SplashScreen();
    And in the constructor:
    controls = LoopOverControls.GetAll(this, typeof(ComboBox));
    string[] lines = File.ReadAllLines(@"c:\wmiclasses\wmiclasses1.txt");
    foreach (string line in lines)
    foreach (ComboBox comboBox in controls.OfType<ComboBox>())
    if (line.StartsWith("ComboBox"))
    comboBoxesNames = line.Substring(14);
    else
    if (line.StartsWith("Classes"))
    if (comboBox.Name == comboBoxesNames)
    comboBox.Items.Add(line.Substring(14));
    foreach (ComboBox comboBox in controls.OfType<ComboBox>())
    comboBox.SelectedIndex = 0;
    The method GetAll is to loop over specific controls:
    public static IEnumerable<Control> GetAll(Control control, Type type)
    var controls = control.Controls.Cast<Control>();
    return controls.SelectMany(ctrl => GetAll(ctrl, type))
    .Concat(controls)
    .Where(c => c.GetType() == type);
    When i'm running the program it's taking some time to make the foreach loops in this time i need to show the SplashScreen and update the progressBar untill the foreach loops over.

    Don't use Application.Doevents. It's not required and can cause problems.
    I do not really grasp the approach you are taking here. So let me make a different suggestion:
    SplashScreen:
    using System;
    using System.Windows.Forms;
    using System.Threading;
    namespace WindowsFormsApplication1
    public partial class SplashScreen : Form
    private static SplashScreen DefaultInstance;
    public SplashScreen()
    InitializeComponent();
    public static void ShowDefaultInstance()
    Thread t = new Thread(TMain);
    t.Name = "SplashUI";
    t.Start();
    public static void CloseDefaultInstance()
    DefaultInstance.Invoke(new Action(DefaultInstance.Close));
    private static void TMain()
    DefaultInstance = new SplashScreen();
    DefaultInstance.Show();
    Application.Run(DefaultInstance);
    public static void UpdateProgress(int Progress)
    if (DefaultInstance.InvokeRequired)
    DefaultInstance.Invoke(new Action<int>(UpdateProgress), Progress);
    else
    DefaultInstance.progressBar1.Value = Progress;
    Form1:
    using System.Windows.Forms;
    namespace WindowsFormsApplication1
    public partial class Form1 : Form
    public Form1()
    InitializeComponent();
    SplashScreen.ShowDefaultInstance();
    for (int i = 1; i<=100; i++)
    System.Threading.Thread.Sleep(20); // simulates work
    SplashScreen.UpdateProgress(i);
    SplashScreen.CloseDefaultInstance();
    EDIT: Please note that the progressbar itself is being animated by the system, so it might look slower than it really is. To workaround this, there are solutions available (you'll find them) that first set the value one higher than necessary, then
    back to the actual value.
    Edit #2: You do need a different thread, otherwise the UI is locked while the loop is running in your Form1's constructor.
    Armin

  • How can I get rid of Apple Maps and Put the Google Maps back?

    I wanted to know how to remove the Apple Maps and reinstall the Google Maps. The Apple Maps is a very inferior programme and not worth the space on the. Computer. It can't find anything. It's a complete waste of time.
    So my original question is, how to get rid of it, and put the Google Maps back?

    CHances are google maps are never coming back as part of the bundled OS. Apple and Google seem to have parted ways (possibly has something to do with Google having their apps on other devices from other manufacturers but no one knows for sure)
    Since preinstalled apps cannot be deleted, the most you can do is ignore the icon, shove it back on a back menu page (I have a 4th menu page on my iPad containing nothing but the bundled apps I consider worthless. I just ignore that page and never go there) and then put a shortcut to google maps on your iPad or find a third party map app you like better.

  • HT201442 my phone is not getting started,its displaying itunes sign and USB sign on the phone's screen. I have also restored and updated the phone however not getting started

    my phone is not getting started,its displaying itunes sign and USB sign on the phone's screen. I have also restored and updated the phone however not getting started

    It helped earlier but it has come back again. I don't know what to do. I tried what you said earlier but this time even this is not working either. And quite intrestingly my phone won't turn off. I turn it off, it goes off and then restarts on its own and then keep giving the same message again and again.
    Could it be a charging cable, is there any chance that the cable which was working fine one day could turn to be "incompatible" with iphone the other day????????
    Please help

  • My MACBOOK Pro turned out to be Snow Leopard, and later upgraded to LION. And update the EFI, I would like to replace the Snow Leopard, EFI can not boot, how do? How to use the Snow Leopard install disk to reduce EFI?

    My MACBOOK Pro turned out to be Snow Leopard, and later upgraded toLION. And update the EFI, I would like to replace the Snow Leopard, EFIcan not boot, how do? How to use the Snow Leopard install disk to reduce EFI?

    Do you mean some of your software does not work in Lion? Do you want to return to using Snow Leopard? If so, then do this:
    Downgrade Lion to Snow Leopard
    1.  Boot from your Snow Leopard Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Quit DU and return to the installer. Install Snow Leopard.
    This will erase the whole drive so be sure to backup your files if you don't have a backup already. If you have performed a TM backup using Lion be aware that you cannot restore from that backup in Snow Leopard (see below.) I suggest you make a separate backup using Carbon Copy Cloner 3.4.1.
    If you have Snow Leopard Time Machine backups, do a full system restore per #14 in Time Machine - Frequently Asked Questions.  If you have subsequent backups from Lion, you can restore newer items selectively, via the "Star Wars" display, per #15 there, but be careful; some Snow Leopard apps may not work with the Lion files.

  • I got this iphone from a guy and everytime i tried to update the applications stored in this phone it keeps asking me the password that the guy used to use, even thou i created a new apple ID of my own and updated the account of icloud and everything in t

    I got this iphone from a guy and everytime i tried to update the applications stored in this phone it keeps asking me the password that the guy used to use, even thou i created a new apple ID of my own and updated the account of icloud and everything in this iphone with the new apple ID, it still asks me the password of the account that the guy used to use whenever i tried to update the applications, and i cant find the guy who gave me this iphone...wt should i do???

    Apps are permanently tied to the AppleID that downloaded them and cannot be transferred to another.  Best thing to do is delete the apps and download those you want or need under your AppleID.

  • How to read and update the value of property file

    Hi,
    I am not able read the values from property file.
    Please tell me how to read and update the values from property file using Properties class
    This is my property file : - Config.properties its located in D:\newfolder
    Values
    SMTP = localhost
    Now i need to change the value of the SMTP
    New value :
    SMTP =10.60.1.9
    Pls Help me
    Thanks
    Merlin Rosina,

    Post a small (<1 page) example program that forum members can copy and run that demonstrates your problem.

  • I have an Iphone 4 16gb and updated the IOS 6.1.2. after the update my 3G is not working at all??. can you please suggest what can be done to rectify this problem?

    i have an Iphone 4 16gb and updated the IOS 6.1.2. after the update my 3G is not working at all??. can you please suggest what can be done to rectify this problem?

    I have the same problem.  After updating to 6.1.2 my iPad 3,2 will not find Verizon network.  It just says "Searching..." for ever.  Any thoughts?

Maybe you are looking for

  • Send an event from Java Web Service to BPEL

    Hi, I have a requirement where from an Async BPEL service I have to call a Java Web Service. After the completion of its task Java Web Service will fire an event that has to be consumed by the BPEL to initiate further process. Can anybody help me wit

  • Plug-in / colorspace errors

    I hope that this is a basic question with a simple solution. I'm running Illustrator CS2 (with the 12.0.1 update) and am having a problem with the standard Photoshop plug-ins that installed with it. What I'm trying to do is apply a Gaussian Blur (thr

  • Any idea how to get an iPod shuffle to remember where I'm up to in an audiobook?

    Yup, that's it really. One million dollars for the correct working answer (only joking). Audiobook is correctly marked as audiobook in iTunes. Is m4b format. Multiple files making up one audiobook. I listen to audiobook up to a point. Pause. Press an

  • Portrait page orientation - ibook author

    How can I make protrait (vertical) orientaton template in iBook Author? For my design I dont need landscape (horisontal) orientation at all.

  • Audio error when using Narration in Premiere Elements 9

    I am trying to help someone using Premiere Elements 9 (v. 9.0.1, up to date).  The details of the computer are: Dell N5010 laptop, 64 bit, Win 7 Home Premium SP 1, Intel i5 2.67 Ghz processor, 6 GB RAM. The user has created a video from both a Sony c