<?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 : DevForce duplicate my entity after save</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : DevForce duplicate my entity after save</description>
  <pubDate>Tue, 12 May 2026 22:29:08 -700</pubDate>
  <lastBuildDate>Wed, 09 Jan 2013 10:27:44 -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=3880</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>DevForce duplicate my entity after save : Thanks for the description, argcargv.  I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3880&amp;PID=15546#15546</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> 3880<br /><strong>Posted:</strong> 09-Jan-2013 at 10:27am<br /><br />Thanks for the description, argcargv.<br /><br />I wasn't, however, able to repro it here. In the callback the Added entity is updated to Unchanged and there is no additional entity there.<br /><br />If can provide a small solution showing the issue we will be able to investigate further.<br /><br />sbelini.]]>
   </description>
   <pubDate>Wed, 09 Jan 2013 10:27:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3880&amp;PID=15546#15546</guid>
  </item> 
  <item>
   <title>DevForce duplicate my entity after save : hi sbeliniright before calling...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3880&amp;PID=15540#15540</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1626" rel="nofollow">argcargv</a><br /><strong>Subject:</strong> 3880<br /><strong>Posted:</strong> 08-Jan-2013 at 10:27pm<br /><br />hi sbelini<div><br></div><div>right before calling SaveChangesAsync, I check entity manager just to make sure there is only one entity exist.</div><div>And yes, there is only one entity exist.</div><div>that entity is SalesOrder with state = Added.</div><div><br></div><div>after calling SaveChangesAsync (in the callback function), I recheck entity manager.</div><div>Now two entity exist (where I expect it should be only one entity exist (the one before save, but with new state = Unchanged).</div><div>basically this two entity are same. first one state is Added, and the second one is Unchange (like I told in the first post).</div><div><br></div><div>about PK:</div><div>PK of SalesOrder is AgencyID, and SOID.</div><div>SOID is assigned right before calling SaveChangesAsync.</div><div>AgencyID is assigned in EntityServerSaveInterceptor.</div><div><br></div><div><span style=": rgb251, 251, 253;">my entity before save:&nbsp;</span></div><div><span style=": rgb251, 251, 253;">&#091;0&#093; AgencyID = 0, SOID = 72, state = Added</span></div><div><span style=": rgb251, 251, 253;"><br></span></div><div><span style=": rgb251, 251, 253;">after save (in callback)</span></div><div><span style=": rgb251, 251, 253;">what I expect:</span></div><div><span style=": rgb251, 251, 253;">&#091;0&#093;</span><span style=": rgb251, 251, 253;">&nbsp;AgencyID, 1, SOID, 72, state = Unchange</span></div><div><span style=": rgb251, 251, 253;">in reality:<br></span></div><div><div style=": rgb251, 251, 253;">&#091;0&#093; AgencyID = 0, SOID = 72, state = Added</div><div style=": rgb251, 251, 253;">&#091;1&#093; AgencyID, 1, SOID, 72, state = Unchange</div></div>]]>
   </description>
   <pubDate>Tue, 08 Jan 2013 22:27:15 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3880&amp;PID=15540#15540</guid>
  </item> 
  <item>
   <title>DevForce duplicate my entity after save : Hi argcargv,  The existing entity...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3880&amp;PID=15535#15535</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> 3880<br /><strong>Posted:</strong> 08-Jan-2013 at 8:23am<br /><br />Hi argcargv,<br /><br />The existing entity should have its EntityState/PK updated rather than a new entity being created.<br /><br />Can you provide a small solution showing this odd behavior?<br /><br />sbelini.]]>
   </description>
   <pubDate>Tue, 08 Jan 2013 08:23:03 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3880&amp;PID=15535#15535</guid>
  </item> 
  <item>
   <title>DevForce duplicate my entity after save : Hi there.I save my entity asynchronously.right...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3880&amp;PID=15534#15534</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1626" rel="nofollow">argcargv</a><br /><strong>Subject:</strong> 3880<br /><strong>Posted:</strong> 07-Jan-2013 at 8:10pm<br /><br />Hi there.<div><br></div><div>I save my entity asynchronously.</div><div>right before save, there is one entity (type SalesOrder) in EntityManager with state Added.</div><div>entity key of salesorder is AgencyID and SOID.</div><div>my entity before save: AgencyID = 0, SOID = 72, state = Added</div><div><br></div><div>After saved, in the callback function, there are 2 SalesOrder in EntityManager.</div><div>they are look the same:</div><div>the first one AgencyID = 0, SOID = 72, state = Added</div><div>second one AgencyID, 1, SOID, 72, state = Unchange.</div><div><br></div><div>why after calling SaveChangesAsync, Devforce create new Entity (second) and just not replace the first one?</div>]]>
   </description>
   <pubDate>Mon, 07 Jan 2013 20:10:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3880&amp;PID=15534#15534</guid>
  </item> 
 </channel>
</rss>