<?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 : Validation not happening on unchanged records</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Validation not happening on unchanged records</description>
  <pubDate>Mon, 13 Apr 2026 17:36:47 -700</pubDate>
  <lastBuildDate>Fri, 22 Jul 2011 14:47:22 -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=2840</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>Validation not happening on unchanged records : Hi mikedfox;Actually as far as...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2840&amp;PID=11268#11268</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> 2840<br /><strong>Posted:</strong> 22-Jul-2011 at 2:47pm<br /><br />Hi mikedfox;<div><br></div><div>Actually as far as I know, validation does happen on an unchanged entity. Please see below for my test.</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>&nbsp; &nbsp; &nbsp; var cust = new Customer();</div><div>&nbsp; &nbsp; &nbsp; Assert.IsTrue(cust.EntityAspect.EntityState.IsDetached());</div><div>&nbsp; &nbsp; &nbsp; _em1.AddEntity(cust);</div><div>&nbsp; &nbsp; &nbsp; Assert.IsTrue(cust.EntityAspect.EntityState.IsAdded());</div><div>&nbsp; &nbsp; &nbsp; cust.EntityAspect.AcceptChanges();</div><div>&nbsp; &nbsp; &nbsp; Assert.IsTrue(cust.EntityAspect.EntityState.IsUnchanged());</div><div>&nbsp; &nbsp; &nbsp; var vrc = _em1.VerifierEngine.Execute(cust);</div><div>&nbsp; &nbsp; &nbsp; Assert.IsTrue(vrc.HasErrors);</div><div>&nbsp; &nbsp; &nbsp; Assert.IsTrue(vrc.Errors.Count &gt; 0);</div></div><div></pre></td></tr></table></div><div><br></div><div>It also works for a detached entity, that is, an entity that has not been added yet to an EntityManager. Maybe if you can tell me what's different between my test and your use case? Also what version are you using?</div>]]>
   </description>
   <pubDate>Fri, 22 Jul 2011 14:47:22 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2840&amp;PID=11268#11268</guid>
  </item> 
  <item>
   <title>Validation not happening on unchanged records : I&amp;#039;m sure this is by intent,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2840&amp;PID=11264#11264</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=764" rel="nofollow">mikedfox</a><br /><strong>Subject:</strong> 2840<br /><strong>Posted:</strong> 21-Jul-2011 at 12:53pm<br /><br />I'm sure this is by intent, but validation not happening on unchanged records.<DIV>&nbsp;</DIV><DIV>Thta sounds reasonable, but its causing us a problem. We have an import process that loads data from an external system. It may not find values for all the fields that the verification rules say should have values. The import doesn't use DevForce.</DIV><DIV>&nbsp;</DIV><DIV>The idea is that the data loads in an invalid state, and the first time the record is accessed, the user is forced to fix it. However, if the user brings up a view that contains parents and children, and doesn't "touch" the child that is missing data, the verification won't catch it on a save.</DIV><DIV>&nbsp;</DIV><DIV>We also have an export process that can only run if all the data is there, so when they hit export, I run down the tree and call the VerificationEngine.Execute on each object. The objects that are missing data do not fail verification.</DIV><DIV>&nbsp;</DIV><DIV>Ideas?</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Thu, 21 Jul 2011 12:53:50 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2840&amp;PID=11264#11264</guid>
  </item> 
 </channel>
</rss>