Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 32982 invoked from network); 20 Oct 2008 06:50:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Oct 2008 06:50:02 -0000 Received: (qmail 92190 invoked by uid 500); 20 Oct 2008 06:49:58 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 92177 invoked by uid 500); 20 Oct 2008 06:49:58 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 92166 invoked by uid 99); 20 Oct 2008 06:49:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 19 Oct 2008 23:49:58 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of deadmoro3@gmail.com designates 72.14.220.158 as permitted sender) Received: from [72.14.220.158] (HELO fg-out-1718.google.com) (72.14.220.158) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Oct 2008 06:48:50 +0000 Received: by fg-out-1718.google.com with SMTP id d23so1332558fga.32 for ; Sun, 19 Oct 2008 23:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=PKDPs1pwo6ckklls07I3JFkjqH2NAByPKLzWl/l3GcA=; b=dQEAEuyjSsw3+nAdOUoBNbmghPC+x0vGOESWa6/WXz555KPAXTDDcnkEZt+P6D5INs YzTPtu1s9KhU2cMfRHCv/c262BfBjMAn8i/Kt4PlXxOlaV/01gmbZvillKfCYlEOs5X3 xi2x607Shk6PTYdy6wuo3bjMiq3Jh2liWKYfU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=RhcmJ6JR8zRn5OgMB15TBAg3garMWTAJ/+3+yDbI0nrR4+mrCNhGVrtBfW2AnXxZQV DacAved9s4wRkRDhqQbYYSYYycjD4f+gRhcTjiAWlMZy4Ir0ni3lJlC8k90WtjWkh+Nn OzeU1ZMZeUaxDopbqqqoNAdlYaEukT4wDPICE= Received: by 10.86.98.10 with SMTP id v10mr6385128fgb.39.1224485357491; Sun, 19 Oct 2008 23:49:17 -0700 (PDT) Received: by 10.86.93.13 with HTTP; Sun, 19 Oct 2008 23:49:17 -0700 (PDT) Message-ID: Date: Mon, 20 Oct 2008 09:49:17 +0300 From: Vadim To: user-java@ibatis.apache.org Subject: Re: Multiple Parameters In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_52155_5875751.1224485357043" References: X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_52155_5875751.1224485357043 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I don't see anything wrong, except 'FROM ATABLE o' in your query, but that's probably a typo, because you would have got an exception by now. Also, you are searching by ID's - maybe queryForObject is more appropriate in this case (just a guess)? Have you tried logging database calls? Do the right parameters get passed? On Mon, Oct 20, 2008 at 7:25 AM, Bruno Frascino wrote: > Hello, > > I have got: > > > > > > > > > > > > > > > > then my DAO does: > > > Map paramM = > *new* HashMap(); > > paramM.put( > "userId", userId); > > paramM.put( > "employeeId", employeeId); > > > > users = (List) > *this*.getSqlMapClientTemplate().queryForList("findIt", paramM); > > > My users list is not null, I don't get any error doing this call but it > returns an empty list. > If I hardcode my query then I get my records... > > Any help please!? > > Cheers! > > > > *Bruno Frascino* > > ------------------------------ > NOTICE - This communication is intended only for the person or entity to > which it is addressed and may contain confidential and/or privileged > material. Any review, retransmission, dissemination or other use of, or > taking any action in reliance on, this communication by persons or entities > other than the intended recipient is prohibited. If you are not the intended > recipient of this communication please delete and destroy all copies and > telephone SMS Management & Technology on 9696 0911 immediately. Any views > expressed in this Communication are those of the individual sender, except > where the sender specifically states them to be the views of SMS Management > & Technology. Except as required by law, SMS Management & Technology does > not represent, warrant and/or guarantee that the integrity of this > communication has been maintained nor that the communication is free from > errors, virus, interception or interference. > ------=_Part_52155_5875751.1224485357043 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I don't see anything wrong, except 'FROM ATABLE o' in your query, but that's probably a typo, because you would have got an exception by now. Also, you are searching by ID's - maybe queryForObject is more appropriate in this case (just a guess)?
Have you tried logging database calls? Do the right parameters get passed?

On Mon, Oct 20, 2008 at 7:25 AM, Bruno Frascino <BFrascino@smsmt.com> wrote:
 Hello,
 
 I have got:
 

<resultMap id="basicUserDetails"class="mypack.domain.BasicUserDetails">

 <result property="user" column="user" />

 <result property="employeeId" column="employee_id" />

 <result property="profileLogin" column="PROFILE_LOGIN" />

</resultMap>  
 

<select id="findIt" parameterClass="java.util.Map" resultMap="basicUserDetails">

<![CDATA[

SELECT

o.user,

o.employee_id,

o.profile_login

FROM ATABLE o

WHERE

o.user = #userId#

AND

o.employee_id = #employeeId#

]]>

</select>
 
 
then my DAO does:
 

Map paramM =

new HashMap();

paramM.put(

"userId", userId);

paramM.put(

"employeeId", employeeId);

 

users = (List)

this
.getSqlMapClientTemplate().queryForList("findIt", paramM);
 
 
My users list is not null, I don't get any error doing this call but it returns an empty list.
If I hardcode my query then I get my records...
 
Any help please!?
 
 Cheers!
 
 

Bruno Frascino



NOTICE - This communication is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking any action in reliance on, this communication by persons or entities other than the intended recipient is prohibited. If you are not the intended recipient of this communication please delete and destroy all copies and telephone SMS Management & Technology on 9696 0911 immediately. Any views expressed in this Communication are those of the individual sender, except where the sender specifically states them to be the views of SMS Management & Technology. Except as required by law, SMS Management & Technology does not represent, warrant and/or guarantee that the integrity of this communication has been maintained nor that the communication is free from errors, virus, interception or interference.

------=_Part_52155_5875751.1224485357043--