ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: remapResults setting and force a reload of sqlmap at runtime
Date Wed, 30 Aug 2006 15:51:57 GMT
The remapResults attributes should only be required if the result
mapping (i.e., column list) changes.

In the case you included, it should not be (nor should the CDATA section).


On 8/30/06, Scott Zhu <scottzhu@gmail.com> wrote:
> In our application, we need to support dynamic table names, so our statement
> would look something like this:
>    <select id="getProductIndexByOfferId" remapResults="true"
> parameterClass="java.util.Map" resultMap="productIndexResult">
>       <![CDATA[
>       select p.ProductID
>       from $UA_ProductIndex$ p
>       where OfferID=#offerID#
>       ]]>
>    </select>
> If I understand it correctly, the remapResults is needed if the selected
> columns or table names can be different at statement execution time (in
> order to regenerate the prepared statement). In our case though, once we
> choose the table name, it will remain the same until we change the
> configuration (happens rarely). Since there's a performance hit by using
> this setting (remapResults), I wonder if it's possible for us not to set it.
> Then when the configuration is changed, is there a way we can force a reload
> of (all the) sqlmap statements on the fly (we don't have an option to bounce
> the app server)? I guess if not, I can still throw away the sqlclient
> instance and re-create it.
> Thanks.

View raw message