title: NHibernate sets the "ON-DELETE" option to RESTRICT instead of CASCADE
body: <p>I have a many-to-one relationship between two tables - Patient and Study.
  When a patient is deleted I expect all his studies will be deleted as well.
  The relevant lines in the <em>hbm.xml</em> files are:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;class name="Study" table="Studies"&gt;
          &lt;id name="Uid"&gt;
              &lt;generator class="guid"/&gt;
          &lt;/id&gt;
          &lt;many-to-one name="Patient" class="Patient" column="PatientId" lazy="false" cascade="all"/&gt;
  &lt;/class&gt;
  </code></pre>
  
  <p>and:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;class name="Patient" table="Patients"&gt;
      &lt;id name="Uid"&gt;
        &lt;generator class="guid"/&gt;
      &lt;/id&gt;
      &lt;property name="PatientId"/&gt;
      &lt;property name="Name" /&gt;
  &lt;/class&gt;
  </code></pre>
  
  <p>I'm using <em>NHibernate 3.3.1</em> and <em>MySQL server</em>.
  By setting <code>cascade=all</code> I expect to see in <em>MySQL</em> workbench that the FK option <code>On Delete</code> will be set to <code>CASCADE</code>, but instead it is set to <code>RESTRICT</code>.
  When I manually change it to <code>CASCADE</code> (through the workbench) everything works fine.
  Is there a way to set it to <code>CASCADE</code> automatically? I also tried setting <code>on-delete=cascade</code> in the <em>hbm.xml</em> file but it didn't work.</p>
  
  <p>Any suggestions?</p>