Before you begin, here is the structure of my classes
I am trying to insert "Personne" into the database and I need to check if it is "PersonnePhysique", "Entreprise" or "Association". So, I did this in my cartographer:
<insert id="creerPersonne" parameterType="Personne"> .... <choose> <when test="getClass() instanceof fr.maaf.personne.PersonnePhysique"> 1, </when> <when test="getClass() instanceof fr.maaf.personne.Association"> 2, </when> <when test="getClass() instanceof fr.maaf.personne.Entreprise"> 2, </when> </choose> ... </insert>
But none of these tests pass. What am I doing wrong?
source share