You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Mark Volkmann <ma...@ociweb.com> on 2007/04/12 23:49:18 UTC
N+1 select and groupBy
I've got a simple situation where Store objects have a property that
is a collection of Phone objects. I've read the section in the iBATIS
documentation and the book that discusses how to setup this kind of
mapping using the resultMap groupBy attribute. My select takes a
storeID, so I expect to get back one Store object that holds a
collection of Phone objects. The actual store in my test has two
phones. What I'm getting back is two Store objects that each have one
Phone.
I can provide more detail, but I thought I'd start with just this and
see if anyone has a guess as to what I might be doing wrong. Perhaps
you've hit this problem too and solved it.