Hello, I have a part which contains a list of many attributes. This is mapped via a bag to list. Right now it has cascade 'all-delete- orphan'. If I load the part, add attributes to the list, the save is done for me. Neato.
I have the current scenario where I want to: 1) load the part with list of attributes 2) close the session 3) modify this list of attributes (via UI) 4) load the part again into new session 5) update the loaded attributes (new session) with the list of changes from the ui (currently detached list of attributes) 6) save the part and have proper work done on attributes (save, update, delete, etc) So in the past I have just done part 5 manually going through the list and doing all the merge operations. I randomly googled on this today and found there is SaveOrUpdateCopy and cascade type merge which seem to possibly be able to do part 5 for me? The problem is I'm dumb and don't fully understand what they do. Is there a way to do something like: // load part var part = session.Get<Part>(id); var partAttributes = part.Attributes; session.Close() // ... ui changes to partAttributes ... var part = session.Get<Part>(id); part.Attributes = partAttributes; // something? session.Flush(); Thanks, and sorry if I'm just bad at googling and this is easy :) -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
