title: MyBatis - Holding multiple types
body: <p>Before starting, here is the structure of my classes</p>
  
  <ul>
  <li><p>Personne</p>
  
  <ul>
  <li><p>PersonnePhysique (extend Personne)</p></li>
  <li><p>PersonneMorale    (extend Personne)</p>
  
  <ul>
  <li>Entreprise  (extend PersonneMorale)</li>
  <li>Association (extend PersonneMorale)</li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>I'm trying to insert a "Personne" in database, and i need to check if it is a "PersonnePhysique", "Entreprise" or "Association".
  So, i did this in my mapper : </p>
  
  <pre><code>&lt;insert id="creerPersonne" parameterType="Personne"&gt;
     ....
  
  &lt;choose&gt;
      &lt;when test="getClass() instanceof fr.maaf.personne.PersonnePhysique"&gt;
          1, 
      &lt;/when&gt;
      &lt;when test="getClass() instanceof fr.maaf.personne.Association"&gt;
          2, 
      &lt;/when&gt;
      &lt;when test="getClass() instanceof fr.maaf.personne.Entreprise"&gt;
          2, 
      &lt;/when&gt;
  &lt;/choose&gt;
  
    ...
  &lt;/insert&gt;
  </code></pre>
  
  <p>But none of this test pass. 
  What am i doing wrong ?</p>