ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sumanta Ghosh <sumant...@tcs.com>
Subject IBATIS not working
Date Fri, 11 Aug 2006 12:41:47 GMT

Hi,

I have just started using IBATIS. We have one sqlMap as following
<sqlMap namespace="Initiator">

  <resultMap id="paymentResult"
class="com.pdl.cas.initiator.domain.Payment">
    <result property="initiatorId" column="initiatorId" columnIndex="1"/>
    <result property="year" column="year" columnIndex="2"/>
    <result property="month" column="month" columnIndex="3"/>
    <result property="gross" column="gross" columnIndex="4"/>
    <result property="tds" column="tds" columnIndex="5"/>
    <result property="net" column="net" columnIndex="6"/>
    <result property="txnSeqNo" column="txnSeqNo" columnIndex="7"/>
    <result property="createdBy" column="createdBy" columnIndex="8"/>
    <result property="createdOn" column="createdOn" columnIndex="9"/>
    <result property="modifiedBy" column="modifiedBy" columnIndex="10"/>
    <result property="modifiedOn" column="modifiedOn" columnIndex="11"/>
    <result property="verNo" column="verNo" columnIndex="12"/>
  </resultMap>
  
  <select id="loadPayment" resultMap="paymentResult"
parameterClass="com.pdl.cas.initiator.domain.Payment">
    SELECT
initiatorId,year,month,gross,tds,net,txnSeqNo,createdBy,createdOn,modifiedBy,modifiedOn,verNo
    FROM Payment WHERE initiatorId=#initiatorId# AND year=#year# AND
month=#month# 
  </select>	

</sqlMap>
 - then I am calling
sqlMap.getQueryForObject("loadPayment",payment,payment);
where payment is an instance of class com.pdl.cas.initiator.domain.Payment

The problem is even if database contain one row with the value specified in
payment instance - it is not getting populated.
Please let me know if I am doing something worng
[NOTE: I am using IBATIS from spring (i.e. using springs
sqlMapClientTemplate)

-- 
View this message in context: http://www.nabble.com/IBATIS-not-working-tf2090424.html#a5761544
Sent from the iBATIS - User - Java forum at Nabble.com.


Mime
View raw message