If it uses nested result maps or nested selects, I'm afraid you're out of luck. You'll need to reduce the query results, or flatten out the results.
Clinton On 2010-01-14, Dave Rafkind <dave.rafk...@gmail.com> wrote: > Hi ibatis list, I'm new to ibatis so perhaps this is a noob question. I'm > using Ibatis 3 (ibatis-3-core-3.0.0.216.jar) with a somewhat complicated > schema (plenty of circular links etc). > > I'm doing something like this: > > List<MyIdObject> ids = session.selectList("getAll"); > > for (id : ids) { > MyObject o = session.select("getOne", id.getActualId()); > } > > The first query returns a list about 2k big, and the second query in the for > loop returns objects that are somewhat large (have several collections in > them, a discriminator, etc). > > The problem I have is that as the for loop marches on it uses an > ever-increasing amount of memory. I would assuming that when the objects in > the body of the for loop go out of scope they can get garbage collected, but > apparently that never happens; is there some weird interaction with the > "first-level cache"? Should I be going about this a different way? > > Thanks! > Dave > -- Sent from my mobile device --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org For additional commands, e-mail: user-java-h...@ibatis.apache.org