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: Problems with displaying contents of table
Date Sat, 07 Jan 2006 20:12:17 GMT
On 1/7/06, zarar.siddiqi@utoronto.ca <zarar.siddiqi@utoronto.ca> wrote:
>
> The first time you called "select", IBatis determined a way to process all
> calls to the statement.  So the next time you call it, IBatis is trying to
> process the query the same way it did earlier (which is understandable).
> But alas, the table has changed and whatever IBatis has stored in memory
> is no longer applicable.

Correct.

>
> One solution might be to re-initialize the SqlMapClient again the same way
> you did on application startup.  This should fix the problem but you will
> lose any caching that you might be doing or IBatis might have done.

There is an easier way! :-)

>
> IBatis' behavior is correct as it can't afford to analyze maps on
> every single call and does the work once.  Altering a table is a fairly
> large move, are you sure you can't avoid it?

It can - remapResults="true" in the select tag will do just that.

Larry

Mime
View raw message