Print Page | Close Window

trouble with RefetchEntities

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=2795
Printed Date: 28-Apr-2024 at 8:20am


Topic: trouble with RefetchEntities
Posted By: downeytim
Subject: trouble with RefetchEntities
Date Posted: 24-Jun-2011 at 8:02am
I cannot seem to get the RefetchEntities to work for us.  I have a PersistanceManager loaded with items.  I process some data in a WCF Service that adds records related to my main entity. 


Session.PM.RefetchEntities(app.CommTransactions, MergeStrategy.OverwriteChanges);
foreach (CommTransaction ct in app.CommTransactions.ToList())
{
Session.PM.RefetchEntities(ct.CompanyCBResults, MergeStrategy.OverwriteChanges);
Session.PM.RefetchEntities(ct.PrincipalCBResults, MergeStrategy.OverwriteChanges);
Session.PM.RefetchEntities(ct.SubmissionErrors, MergeStrategy.OverwriteChanges);
ct.PrincipalCBResults.ToList().ForEach(p => Session.PM.RefetchEntities(p.PrincipalCBTradeLines, MergeStrategy.OverwriteChanges));
}

The code above does not fetch any new records that were added to the SubmissionErrors collection.  I can't understand why.

If anyone has any ideas please let me know.  We are supposed to release to production in less than 2 weeks.  I am in a real bind here if I can't get this to work.



Print Page | Close Window