title: Mybatis one-to-many collection mapping always have one default entity
body: <p>I want to rewrite our services to use mybatis mapping and joins to have our entity full and completed on database/mybatis layer.</p>
  
  <pre><code>&lt;resultMap id="ParentMap" type="org.example.mybatis.Parent"&gt;
      &lt;id column="id" jdbcType="VARCHAR" property="id" /&gt;
      &lt;id column="Name" jdbcType="VARCHAR" property="name" /&gt;
      &lt;id column="SurName" jdbcType="VARCHAR" property="surName" /&gt;
  
      &lt;collection property="childs" column="ChildId"
          javaType="ArrayList" ofType="org.example.mybatis.Child"
          resultMap="org.example.ChildMap" /&gt;    
  &lt;/resultMap&gt;
  
  &lt;resultMap id="ChildMap" type="org.example.mybatis.Parent"&gt;
  
      &lt;id column="id" jdbcType="VARCHAR" property="id" /&gt;
      &lt;id column="Name" jdbcType="VARCHAR" property="name" /&gt;
      &lt;id column="SurName" jdbcType="VARCHAR" property="surName" /&gt;
      &lt;id column="Age" jdbcType="INTEGER" property="age" /&gt;
  &lt;/resultMap&gt;
  
  &lt;sql id="Parent_Column_List"&gt;
      p.Id, p.Name, p.SurName,
  &lt;/sql&gt;  
  
  &lt;sql id="Child_Column_List"&gt;
      c.Id, c.ParentId c.Name, c.SurName, c.Age
  &lt;/sql&gt;  
  
  &lt;select id="getParent" parameterType="java.lang.String" resultMap="ParentMap" &gt;
      select 
      &lt;include refid="Parent_Column_List"/&gt;
  
      &lt;include refid="Child_Column_List" /&gt;
      from Parent p
  
      left outer join Child c on p.Id = c.ParentId
      where p.id = #{id,jdbcType=VARCHAR}
  </code></pre>
  
  <p></p>
  
  <p>Problem is next: if parent doesn't has childs, some default entity with null or default fields will be added to list.
  I understand that this is nature of outer join, but is mybatis not very clever to understand that this is fake? </p>
  
  <p>Is there some workaround about this? I cannot use inner join since parent entity is required to be in result.</p>