Thanks for posting your solution; you've answered my question as well!

Tell your boss I said it was okay for you to take the rest of the day off. ;)

Ted

On 21/03/07, Mikael Andersson <[EMAIL PROTECTED]> wrote:
Hi,
I had a bit of a breakthrough :)

Ditched the subselect; started experimenting with using resultMap and
groupBy instead of select attribute and got it working.

Important change (for new users):

<resultMap id="CurveBOResult" class=" test.bo.CurveBO"
groupBy="curveName,curveCategory">
    <result column="CURVE_NAME" jdbcType="CHAR" property="curveName"/>
   <result column="CURVE_CATEGORY" jdbcType="CHAR"
property="curveCategory"/>
    <result property="curvePoints" resultMap="getCurvePoints"/>
 </resultMap>

I assume this is the preferred way of doing things as well, so I'm happy.

Thanks,
 Mike


On 21/03/07, Ted Schrader <[EMAIL PROTECTED]> wrote:
> Hi Mike,
>
> I see where you found the composite key syntax in the Developer's
> Guide ("Composite Keys or Multiple Complex Parameters Properties").
>
> The guide does make it sound like the values are being passed in to
> the nested select.  I've run out of ideas.
>
> However, when you get this approach working, this will not avoid N+1
> selects from being executed; iBATIS will simply execute them for you
> with a single invocation of queryForXXXX().
>
>
> To the list: the guide also gives the impression that the composite
> key syntax can only be used with nested statements and not with the
> "groupBy" attribute.  Is this true?
>
> Thanks,
>
> Ted
>


Reply via email to