<?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 : ImportEntities and Temporary Id</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : ImportEntities and Temporary Id</description>
  <pubDate>Wed, 13 May 2026 03:47:57 -700</pubDate>
  <lastBuildDate>Sat, 01 Sep 2012 00:16:20 -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=3602</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>ImportEntities and Temporary Id : Walid, It&amp;#039;s not a good idea...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3602&amp;PID=14302#14302</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1005" rel="nofollow">mgood</a><br /><strong>Subject:</strong> 3602<br /><strong>Posted:</strong> 01-Sep-2012 at 12:16am<br /><br />Walid,<br />It's not a good idea to import new entities with temporary ids. Once the entity gets saved by one EM it gets the permanent key assigned and now you are going to have to reconcile all copies in the various EMs with different temporary Ids. It's doable, but sure is a major pain.<br /><br />DB generated Ids are a fundamental headache, because they violate one key principal of an entity and that is the identity of an entity should never change. <br /><br />In rich client application's the best approach is to use Guids or a key generation service. Both have the same thing in common, the key is assigned by the client and doesn't change.<br /><br />You will find that DB generated keys will make you jump through hoops in your client. ]]>
   </description>
   <pubDate>Sat, 01 Sep 2012 00:16:20 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3602&amp;PID=14302#14302</guid>
  </item> 
  <item>
   <title>ImportEntities and Temporary Id :   Walid,Your idea might be a...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3602&amp;PID=14300#14300</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> 3602<br /><strong>Posted:</strong> 31-Aug-2012 at 2:07pm<br /><br />Walid,<div>&nbsp;</div><div>Your idea might be a way to do it, although I don't think the temp Id values will be kept the same.</div><div>Before being persisted (i.e. having been assined a permanent Id) they basically are two different entities. </div><div>I would try assigning (i.e. copying) the values of Entity2 into Entity1 instead.</div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div>]]>
   </description>
   <pubDate>Fri, 31 Aug 2012 14:07:56 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3602&amp;PID=14300#14300</guid>
  </item> 
  <item>
   <title>ImportEntities and Temporary Id :   Thank for your response.That&amp;#039;s...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3602&amp;PID=14299#14299</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3602<br /><strong>Posted:</strong> 31-Aug-2012 at 1:01pm<br /><br />Thank for your response.<div>&nbsp;</div><div>That's what I though but how can I achieve in such a scenario ?</div><div>&nbsp;</div><div>actually I am about to keep trace of the dictionnary result of the 1st ImportEntities and after the 2nd ImportEntities (the import back) I will locate the originals entities and detach them from the entityManager.</div><div>I don't like much this solution but I don't see any other way to do it actually.</div><div>&nbsp;</div>]]>
   </description>
   <pubDate>Fri, 31 Aug 2012 13:01:44 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3602&amp;PID=14299#14299</guid>
  </item> 
  <item>
   <title>ImportEntities and Temporary Id :   Hi Walid,This is the expected...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3602&amp;PID=14298#14298</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> 3602<br /><strong>Posted:</strong> 31-Aug-2012 at 12:13pm<br /><br />Hi Walid,<div>&nbsp;</div><div>This is the expected behavior.</div><div>Since both entities have temp Ids, we wouldn't be able to determine if they are the same or not.</div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div>]]>
   </description>
   <pubDate>Fri, 31 Aug 2012 12:13:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3602&amp;PID=14298#14298</guid>
  </item> 
  <item>
   <title>ImportEntities and Temporary Id : Hi,I have a question regarding...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3602&amp;PID=14297#14297</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=998" rel="nofollow">Walid</a><br /><strong>Subject:</strong> 3602<br /><strong>Posted:</strong> 31-Aug-2012 at 9:53am<br /><br />Hi,<div><br></div><div>I have a question regarding the use of ImportEntites on an Entity having a temporary Id.</div><div>Here is the scenario :</div><div><br></div><div>- in the EM number 1 I create an entity. it gets the ID -100.</div><div>- in the EM number 2 (it was empty) I import this entity. it gets the ID -100 too</div><div>- I edit the entity in the EM2</div><div>- in the EM1 I import the entity from the EM2.</div><div><br></div><div>I was expecting the get the modification in the entity of the EM1. But instead I get 2 entity in the EM1, the unchanged original one and a new entity with the ID -101 having the modification.</div><div><br></div><div>I am aware of the Temporary Id remapping (<a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/entities-import" target="_blank">http://drc.ideablade.com/xwiki/bin/view/Documentation/entities-import</a>) but how can I import back an entity having a temporary ID ?</div><div><br></div><div><br></div><div>Below a project to reproduce my issue&nbsp;</div><div><a href="uploads/998/ImportAndTemporaryIds.rar" target="_blank">uploads/998/ImportAndTemporaryIds.rar</a><br></div>]]>
   </description>
   <pubDate>Fri, 31 Aug 2012 09:53:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3602&amp;PID=14297#14297</guid>
  </item> 
 </channel>
</rss>