ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Bradshaw <gbrads...@davisvision.com>
Subject Re: grougBy issue
Date Thu, 12 Jan 2006 13:59:07 GMT
I'm not trying to be funny, Tony, but could the problem be that you 
misspelled 'parameter_value' in your result map?

         <result property="value" column="paramete_value" />

   - gary

At 01:32 PM 1/11/2006, you wrote:
>I know this has been posted before. I have read a number of archived
>emails regarding this issue and also the example by Clinton. I just
>cannot make it work. The property parameters is always null. (btw, i
>made it work using sub-select strategy). I just want to improve the
>performance. Here is my mapping:
><resultMap id="select-sessionCommon" class="sessionCommon"
>       <result property="brandId" column="brand_id" />
>       <result property="parameters" resultMap="CommonSession.elementMap" />
>    </resultMap>
>    <resultMap id="elementMap" class="element">
>       <result property="value" column="paramete_value" />
>       <result property="parameter" resultMap="CommonSession.parameterMap" />
>    </resultMap>
>    <resultMap id="parameterMap" class="parameter" >
>       <result property="parameterId" column="parameter_id" />
>       <result property="name" column="parameter_name" />
>       <result property="description" column="description" />
>    </resultMap>
>    <select id="selectCommonSession" parameterClass="string"
>resultMap="select-sessionCommon" >
>       SELECT distinct
>        SP.parameter_id,
>        SP.parameter_name,
>        SP.description,
>        SC.parameter_value ,
>        SC.brand_id
>                          SP.parameter_id= SC.parameter_id and
>SC.brand_id=#brandId#  group by SP.parameter_id,SP.parameter_name,
>SP.description, SC.brand_id ;
>    </select>
>please let me know what i did wrong.
>Appreciate your help,

The information contained in this communication is intended
only for the use of the recipient(s) named above. It may
contain information that is privileged or confidential, and
may be protected by State and/or Federal Regulations. If
the reader of this message is not the intended recipient,
you are hereby notified that any dissemination,
distribution, or copying of this communication, or any of
its contents, is strictly prohibited. If you have received
this communication in error, please return it to the sender
immediately and delete the original message and any copy
of it from your computer system. If you have any questions
concerning this message, please contact the sender.

View raw message