Print Page | Close Window

mutiple entity manager - merging changes back

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2148
Printed Date: 23-Oct-2025 at 10:32am


Topic: mutiple entity manager - merging changes back
Posted By: hueha
Subject: mutiple entity manager - merging changes back
Date Posted: 11-Sep-2010 at 9:07am
I am having trouble merging my changes in one entity manager back into the main entity manager.

I create the new entity manager and pass it items from the main entity manager using the method "ImportEntities".  I defined a span that included all the objects I'm interested in.  That works fine but the problem I am having is how do I merge those changes back into the main entity manager?  When I try the same thing in reverse ImportEntities is throwing an error "This method only works with entities from this entity manager"

What is the proper way to merge the changes back into the main entity manager?

Hue



Replies:
Posted By: hueha
Date Posted: 11-Sep-2010 at 9:36am
oh nevermind.  Found the problem.  I was still using objects from the main entity manager and saving them to the new entity manager.  After I retrieved the objects from the new entity it worked fine.



Print Page | Close Window