<?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 : Check existence of dynamic entity</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce Classic : Check existence of dynamic entity</description>
  <pubDate>Fri, 12 Jun 2026 00:12:03 -700</pubDate>
  <lastBuildDate>Thu, 02 Aug 2007 16:30:35 -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=243</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>Check existence of dynamic entity : If you already know the &amp;#034;dynamic...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=243&amp;PID=856#856</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> 243<br /><strong>Posted:</strong> 02-Aug-2007 at 4:30pm<br /><br />If you already know the "dynamic type key name" then you can also look for it directly, like this: <DIV><FONT color=#008080 size=2></FONT>&nbsp;</DIV><DIV><FONT color=#008080 size=2>EntityTypeInfo</FONT><FONT size=2> info = </FONT><FONT color=#008080 size=2>EntityTypeInfo</FONT><FONT size=2>.GetByDynamicTypeKey("ProjectTypeCount");</DIV><DIV><P></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> (info == </FONT><FONT color=#0000ff size=2>null</FONT><FONT size=2>) {</P><DIV>&nbsp;&nbsp; // Create dynamic type</DIV><DIV>&nbsp;</DIV><DIV>}</DIV></FONT></DIV>]]>
   </description>
   <pubDate>Thu, 02 Aug 2007 16:30:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=243&amp;PID=856#856</guid>
  </item> 
  <item>
   <title>Check existence of dynamic entity : Naveen,  You can use EntityT...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=243&amp;PID=819#819</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=23" rel="nofollow">davidklitzke</a><br /><strong>Subject:</strong> 243<br /><strong>Posted:</strong> 31-Jul-2007 at 2:57pm<br /><br />Naveen,<DIV><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp;<P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman">You can use <FONT face="Courier New"><SPAN style="COLOR: teal">EntityTypeInfo</SPAN>.GetAllDynamicTypes()</FONT>to iterate through all of the types in the PersistenceManager cache.&nbsp; Try something like this</FONT></FONT></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">foreach</SPAN> (<SPAN style="COLOR: teal">EntityTypeInfo</SPAN> eti <SPAN style="COLOR: blue">in</SPAN> <SPAN style="COLOR: teal">EntityTypeInfo</SPAN>.GetAllDynamicTypes()) {<o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <SPAN style="COLOR: blue">if</SPAN> (<SPAN style="COLOR: blue">typeof</SPAN>(<SPAN style="COLOR: teal">DynamicEntity</SPAN>).IsAssignableFrom(eti.EntityType) &amp;&amp; (eti.DataSourceExtension == <SPAN style="COLOR: blue">this</SPAN>.mPm1.DataSourceExtension)) {</P><DIV><DIV><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /// Add code to compare Entity types<o:p></o:p></FONT></SPAN></P><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT></SPAN><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></FONT></SPAN></DIV></DIV><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-FAMILY: 'Courier New'"><FONT size=3>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<o:p></o:p></FONT></SPAN></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3>&nbsp;</FONT></o:p></P><P =Ms&#111;normal style="MARGIN: 0in 0in 0pt"><FONT size=3><FONT face="Times New Roman">Note that the EntityTypeInfoGetAllDynamicTypes method is unfortunately misnamed – it will return all known entity types, and also returns everything for all known data source extensions. &nbsp;(We might enter a defect report to fix this.)&nbsp; Anyway, if you then filter out actual dynamic types for your data source extension, you can then compare the dynamic type that you found with the dynamic type that you would like to create.</P><DIV></FONT></FONT>&nbsp;</DIV></SPAN></DIV>]]>
   </description>
   <pubDate>Tue, 31 Jul 2007 14:57:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=243&amp;PID=819#819</guid>
  </item> 
  <item>
   <title>Check existence of dynamic entity : How do we check for the existence...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=243&amp;PID=536#536</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=72" rel="nofollow">naveen.menon</a><br /><strong>Subject:</strong> 243<br /><strong>Posted:</strong> 12-Jul-2007 at 7:57pm<br /><br /><P>How do we check for the existence of an dynamic entity prior to creating a new one?</P><DIV>For e.g, I create such an entity, as below.</DIV><DIV>&nbsp;</DIV><DIV><FONT color=#008080 size=2><P>DynamicEntityTypeBuilder</FONT><FONT size=2>.CreateType(</FONT><FONT color=#800000 size=2>"ProjectTypeCount"</FONT><FONT size=2>, </FONT><FONT color=#800000 size=2>"Default"</FONT><FONT size=2>)</P><DIV>If this line executes a second time, I get a message that says "Entity already exists".</DIV><DIV>&nbsp;</DIV><DIV>How can I query the persistence manager to check if&nbsp;this entity already exists ? </DIV><DIV>&nbsp;</DIV><DIV>Thanks.</FONT></DIV></DIV>]]>
   </description>
   <pubDate>Thu, 12 Jul 2007 19:57:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=243&amp;PID=536#536</guid>
  </item> 
 </channel>
</rss>