ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Poitras Christian" <Christian.Poit...@ircm.qc.ca>
Subject RE: recognizing {...} syntax in result's column attribute
Date Fri, 04 Aug 2006 15:20:01 GMT
Try {information=INFORMATION_ID, name=NAME}.
But, "information" ans "name" must match the parameter name of your
"Person.findInformation" select.


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" />
    <statement id="findAllPersonWithInformation"
            p.ID as ID, 
            p.NAME as NAME, 
            p.AGE as AGE,
            person as p

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" />


<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.

View raw message