Q:

MyBatis collection in association only return one row

I've to use MyBatis for a project and I'm trying to define a resultMap with a collection in my association.
I'll simplify my problem, so we suppose that my database have two table :
World
[idWorld, worldName]
Level
[idLevel,
levelName,
idWorld]
I want to get each world and all levels associated. 
At the moment, I manage to get all result with this result map : 
<resultMap type="World" id="WorldResultMap">
    <id property="idWorld" column="idWorld"/>
    <result property = "worldName" column="worldName"/>
        <collection property="level" javaType="java.util.ArrayList" ofType="Level">
            <result property="idLevel" column="idLevel" />
            <result property="levelName" column="levelName" />
        </collection>
</resultMap>

But after mapping I get a result like that :
  <worlds>
        <world>
            <idWorld>1</idWorld>
            <worldName> Wordl's name</worldName>
            <level> ... </level>
            <level> ... </level>
        </world>
         <world>
            <idWorld>2</idWorld>
            <worldName> Wordl's name</worldName>
            <level> ... </level>
            <level> ... </level>
            <level> ... </level>
        </world>
<worlds>

When I want something like that :
<worlds>
            <world>
                <idWorld>1</idWorld>
                <worldName> Wordl's name</worldName>
                <levels>
                        <level> ... </level>
                        <level> ... </level>
                 </levels> 
            </world>
             <world>
                <idWorld>2</idWorld>
                <worldName> Wordl's name</worldName>
                <levels>
                          <level> ... </level>
                          <level> ... </level>
                          <level> ... </level>
                </levels>
            </world>
    <worlds>

I'm trying to get this result with the following result map :
<resultMap type="World" id="WorldResultMap">
        <id property="idWorld" column="idWorld"/>
        <result property = "worldName" column="worldName"/>
            <association property="levels" javaType="Levels">
                 <collection property="level" javaType="java.util.ArrayList" ofType="Level">
                     <result property="idLevel" column="idLevel" />
                     <result property="levelName" column="levelName" />
                 </collection>
            </association>
    </resultMap>

I change my entity in order to have the list of level into levels and not anymore into world.
My problem is I get only one level for each world in my last result map with the same query.
I think I miss understand the use of "association".
How can I get all my level into levels ?
Any help will be appreciated, thanks in advance.

A:

replace
<result property="idLevel" column="idLevel" />

to 
<id property="idLevel" column="idLevel" />

then you are supposed to get the expected result.

Quote from the mybatis-doc#Result_Maps:

Very Important: id elements play a very important role in Nested Result mapping. You should always specify one or more properties that can be used to uniquely identify the results. The truth is that MyBatis will still work if you leave it out, but at a severe performance cost. Choose as few properties as possible that can uniquely identify the result. The primary key is an obvious choice (even if composite).

If id is absent, "MyBatis will still work". It seems that MyBatis will filter out duplicated rows it thinks.

