ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksandr Elbakyan <ramal...@yahoo.com>
Subject SubQuery
Date Thu, 16 Apr 2009 20:35:35 GMT
Hello,


I have 


class A{

private Integer id;

private Set primB;

private Set secBs;

private Set<Integer> allBIds;

......

}

class B{

private Integer id;

private String name;

.....

}


  <select id="getIds" parameterClass="map"  resultClass="java.lang.Integer">

    <![CDATA[

          select distinct B_id from B

          start with

          b_id in (#parentId#,#ids#)

          connect by PRIOR PARENT_B_ID=B_id

        ]]>

  </select>


  <select id="getAs" parameterClass="map"

    resultMap="th.A">

 ....

        ]]>


</select>



  <resultMap id="A" class="my.A">

    <result property="id" column="A_ID" />

    <result property="primB" resultMap="my.PB" />

    <result property="secBs" resultMap="my.SB" />

    <result property="allBIds" select="getIds"/>

  </resultMap>



I don't know how to pass into getIds subquery PrimB and secBs can anybody help please?


Thanks




      
Mime
View raw message