<?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 : Error creating PredicateDe&#115;cripti&#111;n</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Error creating PredicateDe&#115;cripti&#111;n</description>
  <pubDate>Sun, 12 Apr 2026 08:01:05 -700</pubDate>
  <lastBuildDate>Wed, 28 Dec 2011 17:07:34 -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=3173</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>Error creating PredicateDe&#115;cripti&#111;n : Hi kpinniger,The bug for this...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3173&amp;PID=12338#12338</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> 3173<br /><strong>Posted:</strong> 28-Dec-2011 at 5:07pm<br /><br />Hi kpinniger,<div><br></div><div>The bug for this has been fixed. To clarify, the bug fix for this is a clearer exception message rather than a null ref exception.&nbsp;</div><div><br></div><div>Below is the correct way to build a predicate with a null item in the list.</div><div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>var list = new short?&#091;&#093; { 0, 1, 2, 3 }.ToList();</div><div>var p = new PredicateDescription(typeof(Product), Product.EntityPropertyNames.UnitsInStock, FilterOperator.InList, list);</div><div>var p2 = new PredicateDescription(typeof(Product), Product.EntityPropertyNames.UnitsInStock, FilterOperator.IsEqualTo, null)</div><div>var p3 = p.Or(p2);</div><div>var q = EntityQuery.Create(typeof(Product)).Where(p3);</div></div><div></pre></td></tr></table></div>]]>
   </description>
   <pubDate>Wed, 28 Dec 2011 17:07:34 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3173&amp;PID=12338#12338</guid>
  </item> 
  <item>
   <title>Error creating PredicateDe&#115;cripti&#111;n : Note: This was moved from this...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3173&amp;PID=12286#12286</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> 3173<br /><strong>Posted:</strong> 20-Dec-2011 at 12:25pm<br /><br /><div>Note: This was moved from this post.&nbsp;<a href="http://www.ideablade.com/forum/forum_posts.asp?TID=2806&amp;PID=12283#12283" target="_blank">http://www.ideablade.com/forum/forum_posts.asp?TID=2806&amp;PID=12283#12283</a></div><div><br></div>Hi kpinniger;<div><br></div><div>I'm moving this to a new post as it is a different issue. I was able to duplicate this. Let me file a bug report and get back to you with a workaround if any.</div><div><br></div><div>FYI, the bug on the previous post was fixed in 6.1.2. Here's the description of the bug in the Release Notes.</div><div><br></div><div>PredicateDescriptions using ‘FilterOperator.InList’ will no longer throw an ArgumentException when used with nullable properties. &#091;D1827&#093;</div>]]>
   </description>
   <pubDate>Tue, 20 Dec 2011 12:25:18 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3173&amp;PID=12286#12286</guid>
  </item> 
  <item>
   <title>Error creating PredicateDe&#115;cripti&#111;n : What version was this fixed in,...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=3173&amp;PID=12283#12283</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=717" rel="nofollow">kpinniger</a><br /><strong>Subject:</strong> 3173<br /><strong>Posted:</strong> 20-Dec-2011 at 5:36am<br /><br /><p>What version was this fixed in, we are using 6.1.3.&nbsp; I did not see any PredicateBuilder fixes in the release notes for 6.1.4.</p><p>PredicateDescription predicate = PredicateBuilder.Make(fieldName, FilterOperator.InList, list);</p><p>If there is a null item in the list, the query.Where(predicate) will throw a null reference exception<br></p>]]>
   </description>
   <pubDate>Tue, 20 Dec 2011 05:36:42 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=3173&amp;PID=12283#12283</guid>
  </item> 
 </channel>
</rss>