ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Qian" <daqiqi...@aol.com>
Subject A couple of questions
Date Wed, 29 Mar 2006 21:30:32 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<font size="2"><font face="Arial,sans-serif">All,<br>
Got two questions on iBATIS DAO.<br>
1) I have two tables.&nbsp; Those two tables happen to have a column with
same name.&nbsp; 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. <br>
&lt;resultMap id="savingCardMap" class="MemberSavingCard"
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;result property="savingCardId"
<font color="#0000ff">&lt;result property="expirationDate"
column="S.expiration_date" /&gt;&nbsp;&nbsp;&nbsp; // expiration_date from
&nbsp; &lt;/resultMap&gt;<br>
&nbsp; &lt;resultMap id="couponToInforteMap" class="Coupon"
&lt;result property="couponId" column="coupon_id" /&gt;<br>
<font color="#0000ff">&lt;result property="expirationDate"
column="C.expiration_date" /&gt;&nbsp; // expiration_date from coupon table</font><br>
&nbsp; &lt;/resultMap&gt;<br>
select <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C.coupon_id,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; C.expiration_date,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S.saving_card_id,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; S.expiration_date<br>
from coupon as C, saving_card as S where ....<br>
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?<br>

View raw message