ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim <deadmo...@gmail.com>
Subject Re: Multiple Parameters
Date Mon, 20 Oct 2008 06:49:17 GMT
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.
>

Mime
View raw message