<?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-nullable makes empty string invalid?</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Non-nullable makes empty string invalid?</description>
  <pubDate>Wed, 13 May 2026 07:14:16 -700</pubDate>
  <lastBuildDate>Tue, 17 Apr 2012 14:14:06 -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=3369</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-nullable makes empty string invalid? : Hi Alexander,Even if this is a...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13329#13329</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> 3369<br /><strong>Posted:</strong> 17-Apr-2012 at 2:14pm<br /><br /><div>Hi Alexander,</div><div>&nbsp;</div><div>Even if this is a console application (i.e. 2-tier app) you still have the concept of client and server.</div><div>&nbsp;</div><div>When you set:</div><div>&nbsp;</div><div><em>myEntityManager.VerifierEngine.DefaultVerifierOptions.ShouldTreatEmptyStringAsNull = false;</em></div><div>&nbsp;</div><div>in your console app, it's as if you were changing the VerifierEngine options in the client.</div><div>&nbsp;</div><div>You'd still need to change this setting in the server. You would be able to do that via SaveInterceptor:</div><div>&nbsp;</div><div><em>&nbsp; class SaveInterceptor : EntityServerSaveInterceptor {</em></div><div><em>&nbsp;&nbsp;&nbsp; &nbsp; protected override bool ValidateSave() {</em></div><div><em>&nbsp;&nbsp;&nbsp; &nbsp; EntityManager.VerifierEngine.DefaultVerifierOptions.ShouldTreatEmptyStringAsNull = false;</em></div><div><em>&nbsp;&nbsp;&nbsp; &nbsp; return base.ValidateSave();</em></div><div><em>&nbsp;&nbsp;&nbsp; }</em></div><div><em>&nbsp; }</em></div><div>&nbsp;</div><div>Regards,Silvio.</div>]]>
   </description>
   <pubDate>Tue, 17 Apr 2012 14:14:06 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13329#13329</guid>
  </item> 
  <item>
   <title>Non-nullable makes empty string invalid? : This is on the server. Or, rather,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13321#13321</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1394" rel="nofollow">alexander</a><br /><strong>Subject:</strong> 3369<br /><strong>Posted:</strong> 17-Apr-2012 at 5:27am<br /><br />This <b>is </b>on the server. Or, rather, it's in a Console Application. There's no client/server relationship here, I'm working directly against the project with the edmx file and the IB.Designer.cs file in it.]]>
   </description>
   <pubDate>Tue, 17 Apr 2012 05:27:13 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13321#13321</guid>
  </item> 
  <item>
   <title>Non-nullable makes empty string invalid? :   Have you changed it in the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13302#13302</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> 3369<br /><strong>Posted:</strong> 13-Apr-2012 at 11:04am<br /><br />Have you changed it in the server as well?]]>
   </description>
   <pubDate>Fri, 13 Apr 2012 11:04:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13302#13302</guid>
  </item> 
  <item>
   <title>Non-nullable makes empty string invalid? : I tried doing that, but I still...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13298#13298</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1394" rel="nofollow">alexander</a><br /><strong>Subject:</strong> 3369<br /><strong>Posted:</strong> 13-Apr-2012 at 3:49am<br /><br />I tried doing that, but I still get the same exception. I don't think I'm setting the DefaultVerifierOptions too late either, it's the first thing I do after instantiating my EntityManager.<br><br>I noticed upon catching the exception that the DefaultVerifierOptions.ShouldTreatEmptyStringAsNull setting was false, but that a Non-Public member of the VerifierEngine has a field "_verifierOptions" where the setting was true. I assumed those are the settings being used, not the DefaultVerifierOptions.<br><br>This behavior can be verified by creating an instance of the entity manager and setting the DefaultVerifierOptions.ShouldTreatEmptyStringAsNull setting to false, and then breaking and looking at the following value in the Watch window: ((IdeaBlade.EntityModel.EntityManager)(entityManager)).VerifierEngine._verifierOptions.<br><br>However, even correcting that value didn't fix my problem. I tried changing it through the Watch window, and I STILL get the exception. This issue truly has me baffled.<br><br>I also noticed there was a IdeaBlade.Validation.VerifierOptions.SystemDefault which also has ShouldTreatEmptyStringAsNull. I'm not allowed to modify that one, however, so I can't tell if it influences anything. ]]>
   </description>
   <pubDate>Fri, 13 Apr 2012 03:49:31 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13298#13298</guid>
  </item> 
  <item>
   <title>Non-nullable makes empty string invalid? :   Hi alexander,You should set...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13192#13192</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> 3369<br /><strong>Posted:</strong> 02-Apr-2012 at 10:46am<br /><br />Hi alexander,<div></div><div>You should set <em>ShouldTreatEmptyStringAsNull</em> to false:</div><div>&nbsp;</div><div><em>entityManager.VerifierEngine.DefaultVerifierOptions.ShouldTreatEmptyStringAsNull = false;</em></div><div>&nbsp;</div><div>You can also find this information in the <a href="http://drc.ideablade.com/xwiki/bin/view/&#068;ocumentati&#111;n/validati&#111;n-c&#111;nfigure#HShouldTreatEmptyStringAsNull" target="_blank">DevForce Resource Center</a>.</div><div>&nbsp;</div><div>Regards,</div><div>&nbsp;&nbsp; Silvio.</div>]]>
   </description>
   <pubDate>Mon, 02 Apr 2012 10:46:33 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13192#13192</guid>
  </item> 
  <item>
   <title>Non-nullable makes empty string invalid? : I have some entities, some of...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13181#13181</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=1394" rel="nofollow">alexander</a><br /><strong>Subject:</strong> 3369<br /><strong>Posted:</strong> 02-Apr-2012 at 4:44am<br /><br />I have some entities, some of which have non-nullable string properties. If I set these to an empty string, though, and attempt saving them, I get the following unexpected error message:<br><br>"FieldName is required"<br><br>Yeah, well, I set FieldName to something, I set it to "". Why does your code treat "not null" as "not empty string"? They are not the same thing.<br>]]>
   </description>
   <pubDate>Mon, 02 Apr 2012 04:44:00 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3369&amp;PID=13181#13181</guid>
  </item> 
 </channel>
</rss>