Hi, I have a problem with session management in Unit of Work pattern. This is my scenario:
1) Creating UoW (so creating a new session: lets call it MySession) 2) Creating an invoice (in MySession) 3) Opening list with contractors (in MySession) 4) Selecting contractor and editing Contractor instance from the same session (MySession) 5) Canceling changes (usually closing the session, but in this case (creating invoice is still active) the session has to be alive, so it can't be closed) 7) Ups -> changes that we have maid in step 4 are still visible. The reason is that we didn't close the session in which we have edited the Contractor object. But we can't close the session because it's needed to continue creating the invoice. So what can I do to edit my Contractor object in separated area? I can't create a new session to do that, because I will receive an exception informing me that there are two objects in different sessions with the same Id. Creating a deep clone is not a good solution for me, because my Contractor object has many inner list, properties... Any ideas? Chris -- 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.
