title: Optimize delete query generated by Castle ActiveRecord
body: <p>Lets say I have <code>Id</code> (primary key) list that I want to delete (e.g 1, 2, 3, 4).
  Using this query :</p>
  
  <pre><code>Console.WriteLine ("DELETE DATA :");
  ActiveRecordMediator&lt;PostgrePerson&gt;.DeleteAll ("Id IN (1, 2, 3, 4)");
  </code></pre>
  
  <p>I expect the console output is :</p>
  
  <pre><code>DELETE DATA :
  NHibernate: DELETE FROM Person WHERE Id IN (1, 2, 3, 4)
  </code></pre>
  
  <p><strong>but</strong>, the actual console output is (I use showsql option) :</p>
  
  <pre><code>DELETE DATA :
  NHibernate: select postgreper0_.Id as Id5_, postgreper0_.Name as Name5_, postgreper0_.Age as Age5_, postgreper0_.Address as Address5_ from Person postgreper0_ w
  here postgreper0_.Id in (1 , 2 , 3 , 4)
  NHibernate: DELETE FROM Person WHERE Id = :p0;:p0 = 1
  NHibernate: DELETE FROM Person WHERE Id = :p0;:p0 = 2
  NHibernate: DELETE FROM Person WHERE Id = :p0;:p0 = 3
  NHibernate: DELETE FROM Person WHERE Id = :p0;:p0 = 4
  </code></pre>
  
  <p>What should I do to make Castle ActiveRecord generate the expected (optimized) query?</p>
  
  <p><strong>Update</strong> 
  This is my implementation based on accepted answer.</p>
  
  <pre><code>int[] idList = GetIdList ();
  ActiveRecordMediator&lt;PostgrePerson&gt;.Execute ((session, obj) =&gt; {
      string hql = "DELETE PostgrePerson WHERE Id IN (:idList)";
      return session.CreateQuery (hql)
          .SetParameterList ("idList", idList)
          .ExecuteUpdate ();
  }, null); 
  </code></pre>