ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathew Samuel <grandarchvi...@yahoo.com>
Subject More than one parameter class/map for the <select> element ?
Date Fri, 02 Sep 2005 03:38:36 GMT

Is it possible to pass a 2nd custom/standard class
through a queryForObject() or queryForList() ? Or do I
have to combine both objects under a Collection before
sending it in ? I would want to use certain properties
from the 2nd class to aid the 1st in a join, like
shown below:

  <resultMap id="tableAResult" class="objectA">

  <select id="anId" resultMap="tableAResult"
    select TableA.field1, TableA.field2
    from TableA, TableB
    where TableA.field3 = TableB.field1
    and TableA.field4 = #propertyOfObjectA#
    and TableB.field2 = #someStringNotPartofObjectA#

How is this acheived ?

Start your day with Yahoo! - make it your home page 

View raw message