<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Another ImportEntities bug?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Another ImportEntities bug?</description>
  <pubDate>Sat, 04 Jul 2026 23:40:35 -700</pubDate>
  <lastBuildDate>Wed, 06 Oct 2010 15:29:06 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=2167</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Another ImportEntities bug? : midnit;The bug has been fixed....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8737#8737</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2167<br /><strong>Posted:</strong> 06-Oct-2010 at 3:29pm<br /><br /><div style=": rgb255, 255, 255; margin-left: 1px; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; color: rgb0, 0, 0; font-weight: normal; font-size: 12px; line-height: 1.4; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; -: n&#111;ne; ">midnit;<div><br></div><div>The bug has been fixed. I have an EAP for 6.0.6 here if you wish to download it. Let me know.</div></div>]]>
   </description>
   <pubDate>Wed, 06 Oct 2010 15:29:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8737#8737</guid>
  </item> 
  <item>
   <title>Another ImportEntities bug? : Yes, that is correct. </title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8732#8732</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2167<br /><strong>Posted:</strong> 06-Oct-2010 at 12:38pm<br /><br /><P>Yes, that is correct.</P>]]>
   </description>
   <pubDate>Wed, 06 Oct 2010 12:38:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8732#8732</guid>
  </item> 
  <item>
   <title>Another ImportEntities bug? : midnit;After drilling into it...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8704#8704</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2167<br /><strong>Posted:</strong> 04-Oct-2010 at 1:15pm<br /><br /><div style=": rgb255, 255, 255; margin-left: 1px; margin-top: 1px; margin-right: 1px; margin-bottom: 1px; font-family: Verdana, Arial, Helvetica, sans-serif; color: rgb0, 0, 0; font-weight: normal; font-size: 12px; line-height: 1.4; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; -: n&#111;ne; ">midnit;<div><br></div><div>After drilling into it further, we've discovered that it is a bug. I assume that you're calling the import with MergeStrategy.OverwriteChanges, correct?</div></div>]]>
   </description>
   <pubDate>Mon, 04 Oct 2010 13:15:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8704#8704</guid>
  </item> 
  <item>
   <title>Another ImportEntities bug? : But despite the inability to reproduce...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8696#8696</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2167<br /><strong>Posted:</strong> 04-Oct-2010 at 6:59am<br /><br />But despite the inability to reproduce the specific issue, why would the entity be able to be "Unchanged" but have original data, and if you rejectchanges on an entity that looked like that it recovers the original data...even though its in an "Unchanged" state. It seems something in the process of setting state, or somewhere, it should prevent the possibility of this mixed up circumstance to exist.<DIV>&nbsp;</DIV><DIV>Is there a case where your object should says its "Unchanged" but have OriginalMappedValues? And those values are different then the entities current values? That does not match my idea of "Unchanged" but perhaps I am missing the Vision<strong><FONT color=#0000ff>™</FONT></strong></DIV>]]>
   </description>
   <pubDate>Mon, 04 Oct 2010 06:59:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8696#8696</guid>
  </item> 
  <item>
   <title>Another ImportEntities bug? : To be honest that was over 2 weeks...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8695#8695</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2167<br /><strong>Posted:</strong> 04-Oct-2010 at 6:34am<br /><br />To be honest that was over 2 weeks ago and I have moved far beyond this issue since we have a "workaround" in place. We do not have sql server of any form or northwind and the effort to locate, install, configure these and create an application that reproduces the problem is SO far outside my available time its not funny.]]>
   </description>
   <pubDate>Mon, 04 Oct 2010 06:34:23 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8695#8695</guid>
  </item> 
  <item>
   <title>Another ImportEntities bug? : Hi,  I could not reproduce your...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8683#8683</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=892" rel="nofollow">sbelini</a><br /><strong>Subject:</strong> 2167<br /><strong>Posted:</strong> 30-Sep-2010 at 5:12pm<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>I could not reproduce your issue. Can you provide a reproducible test case?</DIV><DIV>&nbsp;</DIV><DIV>By the way, below is the test I ran (against northwindIB):</DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas></FONT></FONT></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp; int</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> employeeID = 1;</DIV><DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp; var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> targetedEmployeesList = _em1.Employees</DIV><DIV>&nbsp;&nbsp;&nbsp; .Where(emp =&gt; emp.EmployeeID == employeeID)</DIV><DIV>&nbsp;&nbsp;&nbsp; .ToList();</DIV><DIV></FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>&nbsp; Employee</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> anEmployee = targetedEmployeesList.First();</DIV><DIV>&nbsp; anEmployee.FirstName = ModifyString(anEmployee.FirstName);</DIV><DIV>&nbsp; _em2.ImportEntities(</FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>new</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>Entity</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>&#091;&#093; { anEmployee }, </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>MergeStrategy</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.OverwriteChanges);</DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp; var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> op2 = _em2.SaveChangesAsync();</DIV><DIV>&nbsp; op2.Completed += (s, savedArgs) =&gt; {</DIV><DIV>&nbsp;&nbsp;&nbsp; _em1.ImportEntities(savedArgs.Entities, </FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>MergeStrategy</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.OverwriteChanges);</DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp; var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> myEmployeeBackToEM1 = _em1.Employees.With(</FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>QueryStrategy</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.CacheOnly).First();</DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp; var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> nameBeforeRejectChanges = myEmployeeBackToEM1.FirstName;</DIV><DIV>&nbsp;&nbsp;&nbsp; _em1.RejectChanges();</DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp; var</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> nameAfterRejectChanges = myEmployeeBackToEM1.FirstName;</DIV><DIV></FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp; if</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> (nameBeforeRejectChanges == nameAfterRejectChanges) {</DIV><DIV></FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MessageBox</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.Show(</FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"Same values before and after RejectChanges"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>);</DIV><DIV>&nbsp;&nbsp;&nbsp; } </FONT></FONT><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas><FONT color=#0000ff size=2 face=C&#111;nsolas>else</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas> {</DIV><DIV></FONT></FONT><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas><FONT color=#2b91af size=2 face=C&#111;nsolas>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MessageBox</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>.Show(</FONT></FONT><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas><FONT color=#a31515 size=2 face=C&#111;nsolas>"Values changed !"</FONT></FONT></FONT><FONT size=2 face=C&#111;nsolas><FONT size=2 face=C&#111;nsolas>);</DIV><DIV>&nbsp;&nbsp;&nbsp; }</DIV><DIV>&nbsp; };</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV></FONT></FONT></DIV>]]>
   </description>
   <pubDate>Thu, 30 Sep 2010 17:12:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8683#8683</guid>
  </item> 
  <item>
   <title>Another ImportEntities bug? : Am I to assume due to lack of...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8673#8673</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2167<br /><strong>Posted:</strong> 30-Sep-2010 at 6:12am<br /><br /><P>Am I to assume due to lack of response that no one at IdeaBlade cares?</P><DIV></DIV><DIV></DIV>Wasted my time, but thank you for yours.]]>
   </description>
   <pubDate>Thu, 30 Sep 2010 06:12:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8673#8673</guid>
  </item> 
  <item>
   <title>Another ImportEntities bug? : MainEntityManager has a bunch...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8544#8544</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=531" rel="nofollow">midnit</a><br /><strong>Subject:</strong> 2167<br /><strong>Posted:</strong> 17-Sep-2010 at 10:16am<br /><br />MainEntityManager has a bunch of Entities. Change one of them, then import that newly changed Entity into TempEntityManager. Save with TempEntityManager. In the SaveCallback (the Entity says its Unchanged and has no value for OriginalValuesMap)&nbsp;go ahead and import the resultant entity back into MainEntityManager. Now look at this entity in MainEntityManager... <DIV>&nbsp;</DIV><DIV>It has EntityState of Unchanged but&nbsp;it has OriginalValuesMap with data in it. So if you call RejectChanges it goes back to the original value from BEFORE the save. I do not think this is correct. Even if you call AcceptChanges after you import it does nothing and when you call RejectChanges it will revert to the wrong value from BEFORE the save. Currently to work around this I call RejectChanges BEFORE I import the newly saved Entity in MainEntityManager - this puts the OriginalValuesMap to null, then when you import its all good and RejectChanges works as expected.</DIV><DIV>&nbsp;</DIV><DIV><EM><strong>It seems very wrong to me&nbsp;that you can have an Unchanged state yet have original values that differ from the current values.</strong></EM></DIV><span style="font-size:10px"><br /><br />Edited by midnit - 17-Sep-2010 at 10:17am</span>]]>
   </description>
   <pubDate>Fri, 17 Sep 2010 10:16:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2167&amp;PID=8544#8544</guid>
  </item> 
 </channel>
</rss>