title: NHibernate: is there limitation of batch-size to 10 items?
body: <p>I am having a problem with NHibernate (SQL Server 2000, if it matters).</p>
  
  <p>It seems like NHibernate uses batch-size equal to 10 even if I specify 500 (but if I specify size less than 10, say 3 - it uses 3)</p>
  
  <pre><code>&lt;bag name="RiskTypes" table="CalculationQuery" lazy="false" batch-size="50"&gt;
    &lt;key column="CalculationID"&gt;&lt;/key&gt;
    &lt;many-to-many class="RiskType" column="RiskType"&gt;&lt;/many-to-many&gt;
  &lt;/bag&gt;
  </code></pre>
  
  <p>I am loading 11 items and see in NHProf that it executes two queries:</p>
  
  <pre>
  SELECT risktypes0_.CalculationID as Calculat1_1_,
         risktypes0_.RiskType      as RiskType1_,
         risktype1_.RiskTypeID     as RiskTypeID5_0_,
         risktype1_.RiskTypeName   as RiskType2_5_0_
  FROM   CalculationQuery risktypes0_
         left outer join RiskType risktype1_
           on risktypes0_.RiskType = risktype1_.RiskTypeID
  WHERE  risktypes0_.CalculationID in (373 /* @p0 */,363 /* @p1 */,364 /* @p2 */,365 /* @p3 */,
                                       366 /* @p4 */,367 /* @p5 */,368 /* @p6 */,369 /* @p7 */,
                                       370 /* @p8 */,371 /* @p9 */)
  </pre>
  
  <pre>SELECT risktypes0_.CalculationID as Calculat1_1_,
         risktypes0_.RiskType      as RiskType1_,
         risktype1_.RiskTypeID     as RiskTypeID5_0_,
         risktype1_.RiskTypeName   as RiskType2_5_0_
  FROM   CalculationQuery risktypes0_
         left outer join RiskType risktype1_
           on risktypes0_.RiskType = risktype1_.RiskTypeID
  WHERE  risktypes0_.CalculationID = 372 /* @p0 */
  </pre>