Mikael, Ok, here's what I've come up with so far.
On Fri, 2007-04-13 at 13:52 -0700, Daniel Carleton wrote: > I'll play around with putting the groupBy in different places, and > maybe try tracing into the iBATIS source to see what's going on. Moving the groupBys around didn't have any effect. I traced into the code, and I think I have the general idea of what's happening. It looks like groupBys are per-resultMap, and so the aggregation is being reset for each subMap. I haven't quite discovered the spot where this behavior could be cleanly modified, but here is the one location I have pinned down. com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.setResultObjectValues This is where the uniqueKeys are managed per BasicResultMap in the RequestScope. Once the mapping moves on to a new instance of BasicResultMap, it no longer sees the key, and starts a new List. I don't see any way around this issue for my application, and so I guess I'll keep working on it. If anyone has any ideas, I'd be grateful if you chimed in. Cheers, - Daniel
