<?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 : non null foreign keys</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : non null foreign keys</description>
  <pubDate>Mon, 13 Apr 2026 16:14:12 -700</pubDate>
  <lastBuildDate>Wed, 23 Mar 2011 10:55:14 -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=2576</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>non null foreign keys : Thanks for your response, smi-mark.I&amp;#039;m...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2576&amp;PID=10260#10260</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=912" rel="nofollow">DenisK</a><br /><strong>Subject:</strong> 2576<br /><strong>Posted:</strong> 23-Mar-2011 at 10:55am<br /><br />Thanks for your response, smi-mark.<div><br></div><div>I'm adding a feature request to see if we can have this "RequiredEntityVerifier" to be a part DevForce validation.</div>]]>
   </description>
   <pubDate>Wed, 23 Mar 2011 10:55:14 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2576&amp;PID=10260#10260</guid>
  </item> 
  <item>
   <title>non null foreign keys : This is the same issue that I...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2576&amp;PID=10258#10258</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> 2576<br /><strong>Posted:</strong> 23-Mar-2011 at 6:42am<br /><br />This is the same issue that I talked about in my thread. You need to perform validation on the navigation property, not the foreign key. So rather than InvoiceLine looking at InvoiceId, InvoiceLine needs to ensure that the Invoice navigation property is not a NullEntity.<br>]]>
   </description>
   <pubDate>Wed, 23 Mar 2011 06:42:38 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2576&amp;PID=10258#10258</guid>
  </item> 
  <item>
   <title>non null foreign keys : I&amp;#039;m not sure if this is the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2576&amp;PID=10243#10243</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> 2576<br /><strong>Posted:</strong> 22-Mar-2011 at 6:02am<br /><br />I'm not sure if this is the same thing that this thread is talking about<div><a href="http://www.ideablade.com/forum/forum_posts.asp?TID=2540&amp;title=navigati&#111;n-property-verificati&#111;n" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=2540&amp;title=navigation-property-verification</a></div><div><br></div><div>But I'll explain my problem. &nbsp;In the database I have a table let's say invoice and invoicedetail</div><div><br></div><div>InvoiceDetail has a foreign key to Invoice called InvoiceID. &nbsp;Since I don't want any orphan InvoiceDetail the InvoiceID field is not nullable in the database.</div><div><br></div><div>Devforce is creating the the key as an int and adds&nbsp;</div><div>&#091;IbVal.RequiredValueVerifier( ErrorMessageResourceName="InvoiceDetail_InvoiceID")&#093;</div><div>&nbsp;&#091;IbEm.ForeignKey("Invoice")&#093;</div><div>&nbsp;</div><div>The problem I get is that since the field is an int the default value is 0. &nbsp;Then when I go to validate the entity it passes without any validation errors. &nbsp;I'm assuming this is because the RequiredValueVerifier is only looking for a null. &nbsp;Is there a way that I can tell devforce to treat the 0 as if it were a null? &nbsp;I could write my own verifier and then set up a metadata class to do my own validation but then I would have to do that for every foreign key in my database. &nbsp;</div><div><br></div><div>Hue</div>]]>
   </description>
   <pubDate>Tue, 22 Mar 2011 06:02:52 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2576&amp;PID=10243#10243</guid>
  </item> 
 </channel>
</rss>