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 Stuart Piltch <st...@gradientblue.com> on 2005/05/19 15:33:54 UTC

Re: ResultMap composite key problem - SOLVED

Of course it was something simple.

After ripping apart my project until it was just one set of bare bones jars
and classes and still seeing the error, I restored from cvs, cursed the computer
and made some coffee. After a few sips away from the computer, I realized what
happened. A quick trip to my desk, followed by one tap (ok, slam) of the delete
key confirmed it.

This part was correct as we thought it should be:

<result property="categories" column="{testId=test_id, asmtId=assessment_id}"
select="getCompetencyTypes" />

But, the corresponding select statement looked like this:

<select id="getCompetencyTypes" parameterClass="int"
resultMap="competencyTypeResult">

Removing parameterClass="int" made the problem go away.

Cheers,

 - stuart


Re: ResultMap composite key problem - SOLVED

Posted by Clinton Begin <cl...@gmail.com>.
Hmmm..I suppose we could have implemented a better error check there....feel 
free to put in an "Improvement" in JIRA.

Clinton

On 5/19/05, Stuart Piltch <st...@gradientblue.com> wrote:
> 
> Of course it was something simple.
> 
> After ripping apart my project until it was just one set of bare bones 
> jars
> and classes and still seeing the error, I restored from cvs, cursed the 
> computer
> and made some coffee. After a few sips away from the computer, I realized 
> what
> happened. A quick trip to my desk, followed by one tap (ok, slam) of the 
> delete
> key confirmed it.
> 
> This part was correct as we thought it should be:
> 
> <result property="categories" column="{testId=test_id, 
> asmtId=assessment_id}"
> select="getCompetencyTypes" />
> 
> But, the corresponding select statement looked like this:
> 
> <select id="getCompetencyTypes" parameterClass="int"
> resultMap="competencyTypeResult">
> 
> Removing parameterClass="int" made the problem go away.
> 
> Cheers,
> 
> - stuart
> 
>