ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm jee <tm_...@yahoo.co.uk>
Subject Re: recognizing {...} syntax in result's column attribute
Date Sat, 05 Aug 2006 09:42:07 GMT


<!-- DIV {margin:0px;}--thx for the reply Christian, that works.

regards




----- Original Message ----
From: Poitras Christian <Christian.Poitras@ircm.qc.ca>
To: user-java@ibatis.apache.org; tm jee <tm_jee@yahoo.co.uk>
Sent: Friday, 4 August, 2006 11:20:01 PM
Subject: RE: recognizing {...} syntax in result's column attribute

    DIV { MARGIN:0px;}   Try {information=INFORMATION_ID, name=NAME}.
  
 But,  "information" ans "name" must match  the parameter name of your "Person.findInformation"
 select.
  
 Christian
  
 

   From: tm jee [mailto:tm_jee@yahoo.co.uk]  
Sent: Thursday, 03 August 2006 12:35
To:  user-java@ibatis.apache.org
Subject: recognizing {...} syntax in  result's column attribute


 
  
Hi guys, 

Newbie in webwork, just  trying out ibatis with the following sql map configuration (partial).
WIth the  configuration as follows :-

    <resultMap id="result_personWithInformation"  class="testing.ibatis.domain.Person"
>
         <result property="id" column="ID" jdbcType="VARCHAR"  javaType="java.lang.String"
/>
         <result property="name" column="NAME" jdbcType="VARCHAR"  javaType="java.lang.String"
 />
         <result property="age" column="AGE" jdbcType="INTEGER"  javaType="java.lang.Integer"
/>
         <result property="information" column="INFORMATION_ID"  select="Person.findInformation"
/>
     </resultMap>
    
    <statement  id="findAllPersonWithInformation"  resultMap="result_personWithInformation">
         SELECT 
            p.ID  as ID, 
            p.NAME as  NAME, 
            p.AGE as  AGE,
             p.INFORMATION_ID as INFORMATION_ID
         FROM 
            person  as p
    </statement> 

If I want to pass two  arguments into the select with id "Person.findInformation", is it correct
to  change line

<result  property="information" column="INFORMATION_ID" select="Person.findInformation"
 />

to

<result  property="information" column="{INFORMATION_ID, NAME}"  select="Person.findInformation"
/>

I've came across this in the docs  under section "Composite keys or complex parameters properties".
With the above  mentioned line replaced, ibatis seems to be giving me

Column  '{INFORMATION_ID, NAME}' not found.


Am I doing it  wrongly?

Thanks in advance.










Mime
View raw message