ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akins, Greg" <gak...@amervideo.com>
Subject Reading from different datasources in same SqlMapClient instance
Date Tue, 15 Feb 2005 13:36:50 GMT
Maybe I didn't express myself well enough in my last post.

I have a SqlMap that has a select attribute on the result, so that the
Collection is read from another statement.

What I'd really like to be able to do, is use a Java class (instead of a
sql statement), so I can get the collection from another datasource.

Is there a way to force Ibatis to execute a Java method to populate a
result set, instead of just using the SqlMaps?

<resultMap id="getWareResult" class="ware" >
<result property="id" column="WareId" />
<result property="laserId" column="LaserId" />
<result property="mold" column="mold_id" select="getMoldById" />
<result property="avpId" column="AvpId" /> 
<statement id="getWares" resultMap="getWareResult" >
select WareId, LaserId, MoldId, AvpId 
from Ware
where AvpId = #id#

Greg Akins
Software Engineer
Sony Electronics, STP Systems
724.696.7322 (Sony)
724.696.6147 (AV)
724.454.7790 (Cell)
412.590.3973 (Pager)

View raw message