<?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 : TPH - Same column name</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2012 : TPH - Same column name</description>
  <pubDate>Wed, 10 Jun 2026 05:18:35 -700</pubDate>
  <lastBuildDate>Thu, 05 Dec 2013 17:00: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=4621</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>TPH - Same column name : I read that issue, which is why...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4621&amp;PID=17289#17289</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 4621<br /><strong>Posted:</strong> 05-Dec-2013 at 5:00pm<br /><br />I read that issue, which is why I assumed it was working in EF. Apparently not then, if that's where the error is coming from.<br><br><br><br><br>]]>
   </description>
   <pubDate>Thu, 05 Dec 2013 17:00:35 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4621&amp;PID=17289#17289</guid>
  </item> 
  <item>
   <title>TPH - Same column name : This error is actually coming...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4621&amp;PID=17288#17288</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> 4621<br /><strong>Posted:</strong> 05-Dec-2013 at 4:57pm<br /><br />This error is actually coming from EF when we try to access the metadata to construct the ibmmx.&nbsp; It looks like this might be work item 583 on the EF codeplex site, but the site appears to be down at the moment so I can't verify this.&nbsp; &nbsp;The work item is marked as closed and fixed, but there might be more information there on the site (once it's back up).]]>
   </description>
   <pubDate>Thu, 05 Dec 2013 16:57:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4621&amp;PID=17288#17288</guid>
  </item> 
  <item>
   <title>TPH - Same column name : I&amp;#039;m attempting to use Table...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=4621&amp;PID=17287#17287</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=449" rel="nofollow">smi-mark</a><br /><strong>Subject:</strong> 4621<br /><strong>Posted:</strong> 05-Dec-2013 at 1:12pm<br /><br />I'm attempting to use Table Per Hierarchy for the first time, and the following scenario is supposed to work in EF6 but doesn't seem appear to work with DevForce when generating the ibmmx.<br><br><br>Example:<br><br>BaseEntity<br>&nbsp; Id<br>&nbsp; Name<br><br>Entity1<br>&nbsp; ForeignKeyId<br><br>Entity2<br>&nbsp; ForeignKeyId<br><br>Entity3<br>&nbsp;SomeOtherProperty<br><br>The default behavior is it will create ForeignKeyId and ForeignKeyId1<br><br>so the solution is to add the &#091;Column&#093; attribute to each to define it as ForeignKeyId to use the fluent api like:<br><table width="99%"><tr><td class="BBquote"><br>modelBuilder.Entity&lt;Entity1&gt;().Property(p =&gt; p.ForeignKeyId).HasColumnName("ForeignKeyId");<br>modelBuilder.Entity&lt;Entity2&gt;().Property(p =&gt; p.ForeignKeyId).HasColumnName("ForeignKeyId");<br></td></tr></table><br><br>When you do so, you get the following error:<br><br>Error&nbsp;&nbsp;&nbsp; 7&nbsp;&nbsp;&nbsp; An error occurred during metadata generation and a metadata file could not be created.&nbsp; Error: One or more validation errors were detected during model generation:<br><br>ForeignKeyId: : There is no property with name 'ForeignKeyId' defined in the type referred to by Role 'BaseEntity'.<br><br>I really would like them to both map to ForeignKeyId otherwise it is going to clutter up the table, and I might as well switch to a TPT scenario in that case.<br><br>I hope I've explained that correctly. Let me know if you need any more information.<br><br>Thanks,<br><br>Mark<br>&nbsp;<br>]]>
   </description>
   <pubDate>Thu, 05 Dec 2013 13:12:21 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=4621&amp;PID=17287#17287</guid>
  </item> 
 </channel>
</rss>