All,

Got two questions on iBATIS DAO.

1) I have two tables.  Those two tables happen to have a column with same name.  I try to join those two table first and then use groupBy to construct two lists, one for each table. The problem is that I cannot use table qualifier to specify the data from a particular table, such as C.expiration_date and S.expiration_date.

<resultMap id="savingCardMap" class="MemberSavingCard" groupBy="savingCardId">
          <result property="savingCardId" column="saving_card_id" />
          <result property="expirationDate" column="S.expiration_date" />    // expiration_date from saving_card table
  </resultMap>

  <resultMap id="couponToInforteMap" class="Coupon" groupBy="couponId">
          <result property="couponId" column="coupon_id" />
          <result property="expirationDate" column="C.expiration_date" />  // expiration_date from coupon table
  </resultMap>

select
         C.coupon_id,
         C.expiration_date,
         S.saving_card_id,
         S.expiration_date
from coupon as C, saving_card as S where ....

2) if we use SqlMapClient, we can do batch transaction. Does DaoManager support batch transaction similar to SqlMapClient? If not, is there other way to do batch?

thanks,
Tony

Reply via email to