ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emiliano Armellin <earmel...@ateikon.com>
Subject subselects design
Date Mon, 03 Jan 2005 14:42:26 GMT
Hello

I'm a bit confused about the right pattern to implement this kind of 
selects with ibatis.

This is the problem: I've got a select to search products in db. I'm 
using queryForList(java.lang.String id, java.lang.Object 
parameterObject, int skip, int max)  to extract the first 100 records.
For every product extracted by this select I have to do other selects to 
get price/promotions/etc
This subselects take the product.cd as parameters and others parameters 
not in the column of the parent select but passed to the method 
searchProducts(Map pars), so I can't use construct like:

<result property="product" column="{id=PROD_CD}" select="getProdPrice"/>

because getProdPrice needs PROD_CD but also user.cdlist, 
user.cdcompany... am I wrong?

Is rowHandler implementations the correct way to do this?



-- 
Emiliano Armellin

    *
      W_
      www.ateikon.com <http://www.ateikon.com>
    *
      @_
      earmellin@ateikon.com <mailto:earmellin@ateikon.com>
    *
      T_
      *+39 0422 452101*

Get Firefox! <http://www.spreadfirefox.com/?q=affiliates&id=15653&t=86>
Get Thunderbird <http://www.mozilla.org/products/thunderbird/>

Mime
View raw message