<?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 : save duplicating rows</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : save duplicating rows</description>
  <pubDate>Mon, 13 Apr 2026 01:44:21 -700</pubDate>
  <lastBuildDate>Sun, 20 Mar 2011 19:30:40 -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=2555</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>save duplicating rows : Ok that&amp;#039;s not working.This...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10220#10220</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=870" rel="nofollow">hueha</a><br /><strong>Subject:</strong> 2555<br /><strong>Posted:</strong> 20-Mar-2011 at 7:30pm<br /><br />Ok that's not working.<div><br></div><div>This is what is currently happening</div><div><br></div><div>In OrderGrid Row update method</div><div>1)&nbsp;I set a flag let's say updatingDB = true</div><div>2)&nbsp;I call entity manager to save changes on the new row</div><div>3) On callback of save I set updating DB = false</div><div><br></div><div>In the invoice save I do</div><div>1) Check updatingDB</div><div>2) if true then sleep and loop to check again&nbsp;</div><div>3) Update invoice</div><div><br></div><div>The problem is that while it is executing the loop to check the updatingDB flag the callback for the order row save is never processed.</div><div><br></div><div>I tried moving the check to a background thread but then the entity manager save for the invoice complained that it had to be executed on the UI thread.</div><div><br></div>]]>
   </description>
   <pubDate>Sun, 20 Mar 2011 19:30:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10220#10220</guid>
  </item> 
  <item>
   <title>save duplicating rows : Yeah I was afraid you were going...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10216#10216</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=870" rel="nofollow">hueha</a><br /><strong>Subject:</strong> 2555<br /><strong>Posted:</strong> 20-Mar-2011 at 5:49am<br /><br />Yeah I was afraid you were going to say that. &nbsp;I'll have to find a way to get the two view models to communicate now. &nbsp;Thanks for your help<div><br><div>Hue</div></div>]]>
   </description>
   <pubDate>Sun, 20 Mar 2011 05:49:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10216#10216</guid>
  </item> 
  <item>
   <title>save duplicating rows : Oh, the two saves are within the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10212#10212</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 2555<br /><strong>Posted:</strong> 18-Mar-2011 at 7:02pm<br /><br /><P>Oh, the two saves are within the same sandbox.&nbsp; DevForce will allow any concurrent async actions, even though two concurrent saves don't really make a lot of sense.&nbsp; It's up to the application to provide it's own synchronization.&nbsp; Can you just set a flag&nbsp;when a save is underway, which you can then check before trying to issue another save?</P>]]>
   </description>
   <pubDate>Fri, 18 Mar 2011 19:02:11 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10212#10212</guid>
  </item> 
  <item>
   <title>save duplicating rows : the problem is that it&amp;#039;s...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10211#10211</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=870" rel="nofollow">hueha</a><br /><strong>Subject:</strong> 2555<br /><strong>Posted:</strong> 18-Mar-2011 at 6:50pm<br /><br />the problem is that it's part of the same ui action. &nbsp;They are in a grid and then they click the save button. &nbsp;The grid loses focus and calls save. &nbsp;At the same time the button calls a save.]]>
   </description>
   <pubDate>Fri, 18 Mar 2011 18:50:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10211#10211</guid>
  </item> 
  <item>
   <title>save duplicating rows : There&amp;#039;s not a way within...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10210#10210</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=11" rel="nofollow">kimj</a><br /><strong>Subject:</strong> 2555<br /><strong>Posted:</strong> 18-Mar-2011 at 6:21pm<br /><br />There's not a way within DevForce to block an action, since&nbsp;DF will allow any actions on the two sandbox editors.&nbsp; You&nbsp;should be able to use a busy indicator to block the UI, or some sort of signalling&nbsp;or locking within your application.<DIV></DIV><DIV></DIV>]]>
   </description>
   <pubDate>Fri, 18 Mar 2011 18:21:40 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10210#10210</guid>
  </item> 
  <item>
   <title>save duplicating rows : I am having an issue where my...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10160#10160</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=870" rel="nofollow">hueha</a><br /><strong>Subject:</strong> 2555<br /><strong>Posted:</strong> 11-Mar-2011 at 3:48pm<br /><br />I am having an issue where my row is being saved twice into the database. &nbsp;I've found the problem occurs when I am asynchronously saving the object in two different ways. &nbsp;<div><br></div><div>Background:</div><div>I have a foreign key relationship lets say invoice and orders. &nbsp;On the invoice screen I have a grid to maintain the orders using in place editing. &nbsp;If I enter an order and then click the save invoice button what happens is the following</div><div>1) The row change occurs and it tries to commit the currently edited order to the database asynchronously</div><div>2) It tries to save the invoice and its orders. &nbsp;When I save an invoice I get an entity graph of related objects and call the savechangesasync with this list.</div><div>3) I get the callback from the order save</div><div>4) I get the callback from the invoice save</div><div><br></div><div>As far as I can tell this is a concurrency issue. &nbsp;Basically at the time of saving both items have key of -100 so they both do an insert into the table. &nbsp;Is there a way of blocking the second save until the first save is done? &nbsp;The saving is happening in a separate sandbox so I'm happy to make saves &nbsp;"single-threaded" within that entity manager. &nbsp;</div><div><br></div>]]>
   </description>
   <pubDate>Fri, 11 Mar 2011 15:48:41 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2555&amp;PID=10160#10160</guid>
  </item> 
 </channel>
</rss>