<?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 : Entity Server Exception creating PredicateDescription with InList operator on nullable db properties</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Entity Server Exception creating PredicateDescription with InList operator on nullable db properties</description>
  <pubDate>Thu, 15 Oct 2026 14:59:41 -700</pubDate>
  <lastBuildDate>Mon, 11 Jul 2011 16:54:10 -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=2806</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>Entity Server Exception creating PredicateDescription with InList operator on nullable db properties : Hi pk55;This has just been fixed....</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2806&amp;PID=11217#11217</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> 2806<br /><strong>Posted:</strong> 11-Jul-2011 at 4:54pm<br /><br />Hi pk55;<div><br></div><div>This has just been fixed. The patch I sent you doesn't contain this fix. If you want, you can hold off on downloading that patch and I can send you a new one that includes this.</div>]]>
   </description>
   <pubDate>Mon, 11 Jul 2011 16:54:10 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2806&amp;PID=11217#11217</guid>
  </item> 
  <item>
   <title>Entity Server Exception creating PredicateDescription with InList operator on nullable db properties : Thanks pk55. I&amp;#039;ve submitted...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2806&amp;PID=11164#11164</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> 2806<br /><strong>Posted:</strong> 01-Jul-2011 at 6:26pm<br /><br />Thanks pk55. I've submitted another bug report for this. Just so we're on the same page, I had to modify the code as follows for it to throw the same exception.<div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>var list = new short?&#091;&#093; { 1, 2 };</div><div>var p = new PredicateDescription(typeof(Product), Product.EntityPropertyNames.UnitsInStock,&nbsp;FilterOperator.InList, list);</div></div><div></pre></td></tr></table></div>]]>
   </description>
   <pubDate>Fri, 01 Jul 2011 18:26:25 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2806&amp;PID=11164#11164</guid>
  </item> 
  <item>
   <title>Entity Server Exception creating PredicateDescription with InList operator on nullable db properties : I get entity server exceptions...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=2806&amp;PID=11153#11153</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=543" rel="nofollow">pk55</a><br /><strong>Subject:</strong> 2806<br /><strong>Posted:</strong> 30-Jun-2011 at 6:50pm<br /><br /><P>I get entity server exceptions when I try to build a predicate description (either through PredicateBuilder.Make or just newing up a PredicateDescription) when the property to compare to is nullable in the db (with the exception of nullable stirngs; those always seem to work).&nbsp;&nbsp; I've tried explicitly casting values to&nbsp;the&nbsp;nullable type (like int?), typing it as an nullable IList, etc. and nothing seems to work.</P><DIV>I'm using the 6.1.2.0c build.&nbsp; This was from an nullable int property:</DIV><DIV>&nbsp;</DIV><DIV><DIV></DIV><DIV></DIV>Exception Type: IdeaBlade.EntityModel.EntityServerException<BR>Message: Invalid values for InList operation - <strong>not all values of type: System.Nullable`1&#091;System.Int32&#093;<BR></strong>RemoteExceptionName: System.ArgumentException<BR>RemoteExceptionDetails: System.ArgumentException: Invalid values for InList operation - not all values of type: System.Nullable`1&#091;System.Int32&#093;<BR>&nbsp;&nbsp; at IdeaBlade.Linq.PredicateDescription.Validate()<BR>&nbsp;&nbsp; at IdeaBlade.Linq.PredicateDescription.Initialize(FilterOperator filterOp, Object value, Boolean ignoreCase)<BR>&nbsp;&nbsp; at IdeaBlade.Linq.PredicateDescription..ctor(Type instanceType, String propertyPath, FilterOperator filterOp, Object value, Boolean ignoreCase)</DIV><DIV>&nbsp;</DIV><DIV>You can try it against NorthwindIB Product table.&nbsp; It has some nullable smallint&nbsp;types:</DIV><DIV>&nbsp;</DIV><DIV>var p = new PredicateDescription(typeof(Product), "UnitsInStock", FilterOperator.InList, new&#091;&#093; {1,2});</DIV><DIV>&nbsp;</DIV><DIV>This works fine against a non-nullable db column and as I said, works on nullable strings.</DIV>]]>
   </description>
   <pubDate>Thu, 30 Jun 2011 18:50:12 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=2806&amp;PID=11153#11153</guid>
  </item> 
 </channel>
</rss>