ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Qian" <daqiqi...@aol.com>
Subject Re: grougBy issue
Date Thu, 12 Jan 2006 14:23:34 GMT
Gary,

I fixed the misspelling. I still cannot get value for the property, 
parameters. Does IBATIS have some kind of log which I can turn it on so 
that I can see each mapping step?

appreciate all you guys' help,
Tony


Gary Bradshaw wrote on 1/12/2006, 8:59 AM:

 > 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:
 > >All,
 > >
 > >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"
 > >groupBy="brandId">
 > >       <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
 > >        FROM SESSION_INFO_COMMON as SC, SESSION_PARAMETER as SP where
 > >                          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,
 > >Tony
 >
 >
 >
 > ------------------------------------------------------------------------
 > 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.
 > ------------------------------------------------------------------------
 >



Mime
View raw message