You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by AlexElba <ra...@yahoo.com> on 2009/04/16 20:44:09 UTC
Subquery
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
--
View this message in context: http://www.nabble.com/Subquery-tp23084049p23084049.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.