title: Cannot execute Nhibernate query
body: <p>I get the following Nhiberante error, but have no idea why:</p>
  
  <blockquote>
    <p>could not execute query [ select attachment0_.AttachmentId as
    Attachme1_9_, attachment0_.Name as Name9_, attachment0_.IconUrl as
    IconUrl9_, attachment0_.UserId as UserId9_,
    attachment0_.AttachmentTypeId as Attachme6_9_, attachment0_.IsDeleted
    as IsDeleted9_, attachment0_.ArrivalTime as ArrivalT8_9_,
    attachment0_.LocationId as LocationId9_ from Attachment_Attachment
    attachment0_ where attachment0_.DYNAMIC_TYPE='Attachment' and 1=0 ]
    [SQL: select attachment0_.AttachmentId as Attachme1_9_,
    attachment0_.Name as Name9_, attachment0_.IconUrl as IconUrl9_,
    attachment0_.UserId as UserId9_, attachment0_.AttachmentTypeId as
    Attachme6_9_, attachment0_.IsDeleted as IsDeleted9_,
    attachment0_.ArrivalTime as ArrivalT8_9_, attachment0_.LocationId as
    LocationId9_ from Attachment_Attachment attachment0_ where
    attachment0_.DYNAMIC_TYPE='Attachment' and 1=0]</p>
  </blockquote>
  
  <p>Update:</p>
  
  <p>inner exception:</p>
  
  <pre><code>Failed to convert parameter value from a WhereSelectListIterator`2 to a Guid.
  </code></pre>
  
  <p>My query:</p>
  
  <pre><code>x =&gt; locationsIds.Contains(x.LocationId)
  </code></pre>