title: NHibernate : Store VARBINARY to MAX
body: <p>I am using following mapping to store a Serializable object to SQL Server 2008:</p>
  
  <pre><code>&lt;class name="EMSApplication.Data.Domain.Configuration, EMSApplication.Data" table="ems_Configurations" proxy="EMSApplication.Data.Domain.IConfiguration, EMSApplication.Data" lazy="true"&gt;
    &lt;id name="Id" type="System.Int32"&gt;
      &lt;column name="Id" not-null="true"/&gt;
      &lt;generator class="native"/&gt;
    &lt;/id&gt;
    &lt;property name="Settings" type="Serializable"&gt;
      &lt;column name="Settings" not-null="true"/&gt;
    &lt;/property&gt;   
  &lt;/class&gt;
  </code></pre>
  
  <p>It is generating a varbinary(8000) for column type of the database. How can I make it to use varbinary(max)?</p>
  
  <p>If I use:</p>
  
  <pre><code>&lt;property name="Settings" type="Serializable" length="2147483647"&gt;
      &lt;column name="Settings" not-null="true"/&gt;
  &lt;/property&gt; 
  </code></pre>
  
  <p>It is also truncated to 8000. I am using NHibernate3.2(not fluent).</p>