Thanks for the reply. What do you mean by nested result maps or selects? Do
you mean collections or associations with their own selects and result maps?
Why would ibatis exhibit this behavior in that case?

And by flattening, you mean the same kind of stuff used to avoid the n+1
select problem?

On Thu, Jan 14, 2010 at 1:02 PM, Clinton Begin <clinton.be...@gmail.com>wrote:

> 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
>
>

Reply via email to