Import doesn't seem to set the HasChanges on the parent in a Composition relationship

Nov 3, 2010 at 3:36 AM

I've used a slightly modified version of the Import/Export in order to export all entity sets in a context.

When it runs the import, and there are changes to the children in the Compose relationship, but not the parent, then the parent.HasChanges stays false, so an error occurs on SubmitChanges(), it say the child cannot be updated outside of it's parent.

Any ideas?

Coordinator
Nov 4, 2010 at 6:57 PM

The Import/Export are not written to support composition. When using composition, you are not supposed to be using the EntitySet directly so all imports and exports would have to be written to run against the EntityCollection of the parent entity. Sorry, I don't have any sample code to do that as I never use composition myself.