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

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">


          select distinct B_id from B

          start with

          b_id in (#parentId#,#ids#)

          connect by PRIOR PARENT_B_ID=B_id



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





  <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"/>


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


View raw message