I don't find the cause of this problem... I'm using joins to avoid the N+1
problem, as described in the documentation. Here's the xml code:

    <select id="SelectAllPersoon" resultMap="SelectResult">
      select p.*, g.*
      from PERSOON p, GEMEENTE g
      where p.CD_PERS_PST = g.CD_GEM_PST(+)
      and p.CD_PERS_LAND = g.Cd_Gem_Land(+)
      and p.CD_PERS_TAAL = g.CD_GEM_TAAL(+)
    </select>


                <resultMap id="SelectResult" class="Persoon">
                        <result property="Id" column="NR_PERS_ID" />
                        <result property="Naam" column="ST_PERS_NAAM" />
                        <result property="Vnaam" column="ST_PERS_VNAAM" />
                        <result property="Tel" column="ST_PERS_TEL" />
      <result property ="Config" column="XML_PERS_CONFIG"/>
      <result property ="Vader" column="NR_PERS_VADERID"
select="SelectPersoon"/>
      <result property="Gemeente"
resultMapping="Persoon.SelectGemeenteResult"/>
      <result property="AutoList" column="NR_PERS_ID"
select="SelectAutosForPersoon"/>
                </resultMap>

    <resultMap id="SelectGemeenteResult" class="Gemeente">
      <result property="Pst" column="CD_GEM_PST"/>
      <result property="Land" column="CD_GEM_LAND"/>
      <result property="Taal" column="CD_GEM_TAAL"/>
      <result property="Naam" column="CD_GEM_NAAM"/>
    </resultMap>

    <resultMap id="SelectAutosForPersoonResultLazy" class="Auto">
      <result property="Id" column="NR_AUTO_ID"/>
      <result property="Merk" column="ST_AUTO_MERK"/>
      <result property="Jaar" column="ST_AUTO_JAAR"/>
    </resultMap>


The error message is simply: CD_GEM_NAAM

Also, Persoon - Auto is an n-m relation. I want to retrieve a List of all
autos that person has (the AutoList property is an IList). Am I doing that
the right way ? I find the documentation lacking what m-n concerns, don't
know how well iBatis supports this.

Thanks,
-- 
View this message in context: 
http://www.nabble.com/indexoutofrangeexception-using-resultMapping---tf1918301.html#a5251301
Sent from the iBATIS - User - Cs forum at Nabble.com.

Reply via email to