title: i am getting this error when i try to preview query in Orchard CMS
body: <p>I create a new query and when i try to preview it i get the following error. </p>
  
  <p>i followed this link and created a content type Book and add content part product to it. </p>
  
  <p><a href="http://skywalkersoftwaredevelopment.net/blog/writing-an-orchard-webshop-module-from-scratch-part-5" rel="nofollow">http://skywalkersoftwaredevelopment.net/blog/writing-an-orchard-webshop-module-from-scratch-part-5</a></p>
  
  <p>could not execute query </p>
  
  <p>[ select distinct TOP (@p0)  contentite0_.Id as col_0_0_ from Orchard_Framework_ContentItemVersionRecord contentite0_ inner join Orchard_Framework_ContentItemRecord contentite1_ on contentite0_.ContentItemRecord_id=contentite1_.Id inner join Customer_ProductPartRecord productpar2_ on contentite1_.Id=productpar2_.Id where contentite0_.Published=1 order by contentite0_.Id ]</p>
  
  <p>[SQL: select distinct TOP (@p0)  contentite0_.Id as col_0_0_ from Orchard_Framework_ContentItemVersionRecord contentite0_ inner join Orchard_Framework_ContentItemRecord contentite1_ on contentite0_.ContentItemRecord_id=contentite1_.Id inner join Customer_ProductPartRecord productpar2_ on contentite1_.Id=productpar2_.Id where contentite0_.Published=1 order by contentite0_.Id]</p>
  
  <pre><code>**ProductPartFilter.cs**
  
  using Orchard.Localization;
  using Orchard.Projections;
  using Orchard.Projections.Descriptors.Filter;
  using Skywalker.Webshop.Models;
  using IFilterProvider = Orchard.Projections.Services.IFilterProvider;
  
  namespace Skywalker.Webshop.Filters
  {
  public class ProductPartFilter : IFilterProvider
  {
      public Localizer T { get; set; }
  
      public ProductPartFilter()
      {
          T = NullLocalizer.Instance;
      }
  
      public void Describe(DescribeFilterContext describe)
      {
          describe.For(
              "Content",          // The category of this filter
              T("Content"),       // The name of the filter (not used in 1.4)
              T("Content"))       // The description of the filter (not used in 1.4)
  
              // Defines the actual filter (we could define multiple filters using the  fluent syntax)
              .Element(
                  "ProductParts",     // Type of the element
                  T("Product Parts"), // Name of the element
                  T("Product parts"), // Description of the element
                  ApplyFilter,        // Delegate to a method that performs the actual  filtering for this element
                  DisplayFilter       // Delegate to a method that returns a descriptive  string for this element
              );
      }
  
      private void ApplyFilter(FilterContext context)
      {
  
          // Set the Query property of the context parameter to any IHqlQuery. In our    case, we use a default query
          // and narrow it down by joining with the ProductPartRecord.
          context.Query = context.Query.Join(x =&gt;     x.ContentPartRecord(typeof(ProductPartRecord)));
      }
  
      private LocalizedString DisplayFilter(FilterContext context)
      {
          return T("Content with ProductPart");
      }
    }
   }
  </code></pre>