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:[EMAIL PROTECTED]
Sent: Thursday, 03 August 2006 12:35
To: [email protected]
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.

Reply via email to